diff options
| author | tslil clingman <tslil@posteo.de> | 2021-01-24 19:06:49 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | cf921b2e647136dc34568e0fff78b67c14c8e2fa (patch) | |
| tree | 63f2a46fbb131d2390cddb13a5f69e8c03a91cb7 /include/action_list.h | |
| parent | 815cde44e5060ad093347bb47fc66d41c9d3a3ed (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); |
