diff options
| author | tslil clingman <tslil@posteo.de> | 2021-01-25 17:22:48 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | 8418ddf3187ec0f526ef5d8dbb0689fc786fac92 (patch) | |
| tree | aeb5b1ad5b0df50b0ce5c484d732ffd6534223e0 /include/action_list.h | |
| parent | 034b4035f584f83669f7c4332d8befc3237e160c (diff) | |
Still some bugs, standing stone becomes flat at depth4 self-play??
Diffstat (limited to 'include/action_list.h')
| -rw-r--r-- | include/action_list.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/include/action_list.h b/include/action_list.h index a0f5a34..14c733f 100644 --- a/include/action_list.h +++ b/include/action_list.h @@ -5,19 +5,24 @@ enum A_TYPE { A_PLACE, A_MOVE }; -typedef struct action_list_s { - struct action_list_s *next; +typedef struct action_node_s { + struct action_node_s *next; enum A_TYPE type; int8_t loc; uint8_t data0; uint8_t data1; +} action_node_t; + +typedef struct action_list_s { + struct action_node_s *head; + uint32_t length; } action_list_t; void action_list_init(void); 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); +void action_take(action_node_t *action); +void action_undo(action_node_t *action); -void action_to_ptn(action_list_t* action, char* out_ptn); +void action_to_ptn(action_node_t* action, char* out_ptn); |
