![]() |
Zap'Em Blast'Em Robots
robots that play laser tag!
|
Structure that represents the game task state and configuration. More...
#include <game_task.h>
Data Fields | |
| int32_t | state |
| int32_t | num_states |
| int32_t | play_flag |
| int32_t | score_red |
| int32_t | score_blue |
| int32_t | score_red_prev |
| int32_t | score_blue_prev |
| int32_t | score_thresh |
| int32_t | num |
| uint32_t | red_delay_start |
| uint32_t | blue_delay_start |
| int32_t | red_delay_flag |
| int32_t | blue_delay_flag |
| uint32_t | delay |
| uint32_t | end_delay |
| SoundTask * | sound_task_ptr |
| PhotoresistorTask * | red_photoresistor_task_ptr |
| PhotoresistorTask * | blue_photoresistor_task_ptr |
| motor_t * | mred |
| motor_t * | mblue |
| I2C_HandleTypeDef * | i2c_handle |
| game_fcn_t | state_list [] |
Structure that represents the game task state and configuration.
This structure holds all the variables and function pointers necessary to run game operations within the task-based state machine.
| int32_t blue_delay_flag |
Blue in delay or not
| uint32_t blue_delay_start |
Blue delay start time
| PhotoresistorTask* blue_photoresistor_task_ptr |
Pointer to Blue PhotoresistorTask object
| uint32_t delay |
Length of delay in ms
| uint32_t end_delay |
Length of end of game delay
| I2C_HandleTypeDef* i2c_handle |
Pointer I2C handle
| motor_t* mblue |
Pointer to red motor object
| motor_t* mred |
Pointer to red motor object
| int32_t num |
Counter variable
| int32_t num_states |
Total number of states
| int32_t play_flag |
game in play mode
| int32_t red_delay_flag |
Red in delay or not
| uint32_t red_delay_start |
Red delay start time
| PhotoresistorTask* red_photoresistor_task_ptr |
Pointer to Red PhotoresistorTask object
| int32_t score_blue |
Blue fighter's score
| int32_t score_blue_prev |
Blue's previous score
| int32_t score_red |
Red fighter's score
| int32_t score_red_prev |
Red's previous score
| int32_t score_thresh |
Score needed to to win
| int32_t state |
Current state index
| game_fcn_t state_list[] |
Function pointer list for states