|
SNAKE_STM32F3
|
Implementation of high-level game state machine module. More...
#include <stdbool.h>#include "game.h"#include "snake.h"#include "Joystick.h"#include "game_renderer.h"
Enumerations | |
| enum | { MENU , GAME } |
Functions | |
| void | game_loop (void) |
| Main game state machine function. | |
| void | game_init (void) |
| Main game init function. | |
| void | game_start_request (int game_seed) |
| Requests start of the game in state machine. | |
| void | game_tick_request (void) |
| Requests one tick game progression (one snake move) in state machine. | |
Implementation of high-level game state machine module.
SPDX-License-Identifier: MIT
| void game_init | ( | void | ) |
Main game init function.

| void game_loop | ( | void | ) |
Main game state machine function.
Handles two application states (MENU, GAME).

| void game_start_request | ( | int | game_seed | ) |
Requests start of the game in state machine.
| game_seed | Seed used for random fruit position generator. |
| void game_tick_request | ( | void | ) |
Requests one tick game progression (one snake move) in state machine.