Expand description
§snake_game
this is library for game binary, this library do many things for this game
Structs§
- Rng
- struct for implementation of LCG algoritm
Constants§
- H
- hardcoded height of the game field, player can go maximum of H-1 positions
- W
- hardcoded width of the game field, player can go maximum of W-1 positions
Functions§
- check_
borders - checks position of
point - check_
game_ over - checks if head is in the any part the body if so aborts game
- handle_
keyboard - handles keyboard.
- show_pg
- Draws main tui screen