![](https://uploads.gamedev.net/forums/monthly_2024_02/56bb3b0fd7c44abcbf263303835eefed.image.png)
I need a bot for a mini-game that functions similarly to a Snake game in terms of its mechanics.
A= Pot which is somewhat like a fruit in a snake classic game, but here it keeps moving every 2 seconds in a random place on this grid.
B= The Fruit here is like a snake who keeps moving. All we can do is control and guide it in such a way to hit the pot and make a score.
C= the joystick in the middle is just for a visual representation of the direction of the fruit in the game, which changes direction based on the arrow keys we press.
D= The timing seen on top is a cycle of 15 seconds, which means a fruit has 15 seconds to hit the pot if it doesn't manage to hit the pot in 15 seconds we don't score and a new cycle starts.
The mechanism works as follows:
The fruit begins at the centre of the grid, directly below the joystick, and moves toward a specific position. Using arrow keys (up, down, right, left), we control its movement to ensure it hits the pot within a 15-second time limit. The cycle concludes under three conditions: the 15-second time limit elapses, the fruit successfully hits the pot, or the fruit collides with the grid's walls. In any of these cases, a new cycle begins.