|
SNAKE_STM32F3
|
Implementation of game logic module with low level state machine. More...

Functions | |
| void | snake_move (void) |
| void | snake_fruit_check (void) |
| void | snake_game_init (void) |
| void | snake_update (void) |
| snake logic state machine function. | |
| void | snake_direction_request (direction_t requested_direction) |
| Requests change of current snake direction in state machine. | |
| void | snake_init_request (int fruit_seed) |
| Requests initialization of the snake game in state machine. | |
| void | snake_move_request (void) |
| Requests 1-tile move of snake in state machine. | |
| bool | snake_is_over (void) |
| Checks if snake game state is GAME_OVER. | |
| const snake_state * | snake_get_state (void) |
| Passes current snake game state. | |
| void | fruit_pick_position (void) |
Implementation of game logic module with low level state machine.
SPDX-License-Identifier: MIT
| void fruit_pick_position | ( | void | ) |
| void snake_direction_request | ( | direction_t | requested_direction | ) |
Requests change of current snake direction in state machine.
| requested_direction | Direction requested by input system. |
| void snake_fruit_check | ( | void | ) |

| void snake_game_init | ( | void | ) |

| const snake_state * snake_get_state | ( | void | ) |
Passes current snake game state.
| void snake_init_request | ( | int | fruit_seed | ) |
Requests initialization of the snake game in state machine.
| fruit_seed | Seed used for random fruit position generator. |
| bool snake_is_over | ( | void | ) |
Checks if snake game state is GAME_OVER.
| void snake_move | ( | void | ) |
| void snake_move_request | ( | void | ) |
Requests 1-tile move of snake in state machine.
| void snake_update | ( | void | ) |
snake logic state machine function.
Handles three snake game states (INIT, GAME_OVER, RUNNING).
