Steps:
- enter game board size
- enter difficulty
- board appears
- hit space to start the game
- while playing the game, if you wish to reset the game, press enter and to start playing again, hit spacebar again
- while playing the game, if you wish to pause the game, press P key to pause the game but the game timer will not stop, hit P again.
- you can pass through the walls
- score and time is displayed on the top and the game mode at the bottom
- if you die, the board reets and you need to hit spacebar again to restart the game. steps for AI:
- same as above but keyboard wont work.
for shortest path DFS AI Algo: (only for small board size) when snake length is 1, it disobeys direction rules so have to fix that or can initialize snake with length 2 this path is not necessarily the least distance valid path between the head and food but the shortest path DFS could find. crash report: AI would crash if it reached a new food before digesting the old food. the length of snake would not increace in sinngleplayer mode. that has been taken care of by instant digestion.
shortest path BFS AI Algo: it will find the actual shortest distance valid path
Thankyou