I think there is some kind of bug where a bot is stopping.
Example : http://www.scribd.com/job_game/match/275573
I simulated two boards where this bug happens online, and it doesn't happen locally.
Also, the API is wrong here : "return the index of that fruit (starting with 0)" => It starts at 1