Skip to main content

Crate snake_game_tui

Crate snake_game_tui 

Source
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