diff options
| author | tslil clingman <tslil@posteo.de> | 2021-01-24 19:06:49 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2021-01-24 19:06:49 -0500 |
| commit | 8645a180a7e288b422a3fd39814fa55129d8afec (patch) | |
| tree | 63f2a46fbb131d2390cddb13a5f69e8c03a91cb7 /include/action_list.h | |
| parent | 752f58f9a9ac18d7c8b14fb618933e3f0e12a598 (diff) | |
Working on action lists to refactor
Diffstat (limited to 'include/action_list.h')
| -rw-r--r-- | include/action_list.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/include/action_list.h b/include/action_list.h new file mode 100644 index 0000000..3670114 --- /dev/null +++ b/include/action_list.h @@ -0,0 +1,21 @@ +#include <stdlib.h> +#include <stdint.h> + +#include <tak.h> + +enum A_TYPE { A_PLACE, A_MOVE }; + +typedef struct action_list_s { + struct action_list_s *next; + enum A_TYPE type; + uint8_t loc; + uint8_t data0; + uint8_t data1; +} action_list_t; + +void action_list_init(const uint8_t new_board_size); +void action_list_free(action_list_t *list); +action_list_t *action_list_generate(void); + +void action_take(action_list_t *action); +void action_undo(action_list_t *action); |
