Design a grid within which the snake can move and eat fruits.
Enhance the game with features like a background, sound effects, and more.
The snake blinks and displays a tongue animation for added visual appeal.
Customizable backgrounds for the game.
Includes a "Start" button and a tutorial. Clicking "Start" begins the game, while clicking "Tutorial" puts the game in an automatic mode where the snake moves on its own.
Multiple fruit types with varying scores.
A special pepper bonus. If the snake eats it, it "burns," and the snake moves automatically.
The total score is displayed at the top of the screen. After eating a fruit, the points gained are briefly shown.
Engaging background music is added for the start and settings pages, along with sound effects for eating fruits.
Users can customize the background color, snake color, and game difficulty.
We have implemented the A* algorithm to enable the snake to find its path to the fruit. You can see this algorithm in action in two scenarios:
- By clicking on the "Tutorial" button.
- By eating the pepper bonus on the main page.
In these scenarios, the snake moves faster and not only finds its path but also visually displays the planned route.
Additionally, we have implemented a backup path mechanism. If the snake cannot find a direct path to the fruit, it takes a path with the most free space until a valid path to the fruit becomes available.