|
Simone: a game of visual memory and speed
|
Header for fsm_simone.c file. More...
Data Structures | |
| struct | fsm_simone_t |
| Structure that contains the information of the Simone FSM. More... | |
Macros | |
| #define | KEY_RED |
| #define | KEY_GREEN |
| #define | KEY_BLUE |
| #define | KEY_YELLOW |
| #define | KEY_TURQUOISE |
| #define | KEY_WHITE |
| #define | KEY_INVALID_COLOR ' ' |
| #define | LEVEL_MAX_INTENSITY |
| #define | LEVEL_EASY_MIN_INTENSITY |
| #define | LEVEL_MEDIUM_MIN_INTENSITY |
| #define | LEVEL_HARD_MIN_INTENSITY |
| #define | SEQUENCE_LENGTH |
| #define | NUMBER_OF_COLORS_GAME |
| #define | SIMONE_TIME_OFF_BETWEEN_COLORS_MS |
| #define | SIMONE_TIME_VISUAL_FEEDBACK_MS |
| #define | SIMONE_TIME_ON_LEVEL_EASY_MS |
| #define | SIMONE_TIME_ON_LEVEL_MEDIUM_MS |
| #define | SIMONE_TIME_ON_LEVEL_HARD_MS |
| #define | SIMONE_TIME_WAIT_INPUT_MS |
Enumerations | |
| enum | FSM_SIMONE { IDLE = 0, ADD_COLOR, PLAYBACK, WAIT_KEY, VERIFY_INPUT, SLEEP_WHILE_IDLE, SLEEP_WHILE_PLAYBACK } |
| Enumerator for the Simone finite state machine. More... | |
| enum | LEVELS { LEVEL_EASY = 0, LEVEL_MEDIUM, LEVEL_HARD } |
| Enumerator to define the difficulty levels of the Simone game. | |
Functions | |
| fsm_simone_t * | fsm_simone_new (fsm_button_t *p_fsm_button, uint32_t on_off_press_time_ms, fsm_keyboard_t *p_fsm_keyboard, fsm_rgb_light_t *p_fsm_rgb_light, uint8_t level) |
| Create a new Simone FSM. | |
| void | fsm_simone_fire (fsm_simone_t *p_fsm) |
| Fire the Simone FSM. | |
| void | fsm_simone_destroy (fsm_simone_t *p_fsm) |
| Destroy an Simone FSM. | |
Header for fsm_simone.c file.
| #define KEY_BLUE |
Key for BLUE color
| #define KEY_GREEN |
Key for GREEN color
| #define KEY_INVALID_COLOR ' ' |
Invalid key
| #define KEY_RED |
Key for RED color
| #define KEY_TURQUOISE |
Key for TURQUOISE color
| #define KEY_WHITE |
Key for WHITE color
| #define KEY_YELLOW |
Key for YELLOW color
| #define LEVEL_EASY_MIN_INTENSITY |
Minimum intensity in % to play in the easy level of the game
| #define LEVEL_HARD_MIN_INTENSITY |
Minimum intensity in % to play the hard level of the game
| #define LEVEL_MAX_INTENSITY |
Max intensity in %
| #define LEVEL_MEDIUM_MIN_INTENSITY |
Minimum intensity in % to play the medium level of the game
| #define NUMBER_OF_COLORS_GAME |
Number of colors in the game
| #define SEQUENCE_LENGTH |
Length of the sequence of colors
| #define SIMONE_TIME_OFF_BETWEEN_COLORS_MS |
Time off between colors in the sequence
| #define SIMONE_TIME_ON_LEVEL_EASY_MS |
Time color on in easy level
| #define SIMONE_TIME_ON_LEVEL_HARD_MS |
Time color on in hard level
| #define SIMONE_TIME_ON_LEVEL_MEDIUM_MS |
Time color on in medium level
| #define SIMONE_TIME_VISUAL_FEEDBACK_MS |
Time of the visual feedback when the player presses a key
| #define SIMONE_TIME_WAIT_INPUT_MS |
Time max between player key press
| enum FSM_SIMONE |
Enumerator for the Simone finite state machine.