Every player in the competition creates an AI snake. The players need to implement the 'make_decision' function so their snake will be 'smart' enough to survive and win.
Every frame, the method make_decision is being called so every snake will have to choose where it should go in order to win.
Some information about the game:
Logic:
- Snake that hits itself is out.
- Snake that hits a border is out.
- Snake that hits other snake is out.
- When snakes collide head to head, they both will be out of the game, unless one of them is a king, it will survive the collision.
- Snake that caused an exception to raise, will be removed from game.
- The winner is the snake with the highest score when the time is over or when there are no more snakes in the game.
Fruits:
- 'Strawberry' - makes the snake one unit longer.
- 'Dragon Fruit' - makes the snake two units longer.
- 'Bomb' - shrinks the snake in 2 units.
- 'Shield' - protects the snake from getting hurt when eating a bomb. Snake with a shield can cross itself. Snake with a shield won't get hurt by Skull. The shield protects the snake only once.
- 'Skull' - kills the snake that eats it unless the snake is shielded or a king.
- 'King' - Snake moves and makes decision X2 from the other snakes. Every fruit snake eats, increases the snake in two units (even skull).
- 'knife' - gives the snake the power to cut other snakes. This power is limited for cutting only one snake.
You can press + or - keys to adjust the delay between frames.