aboutsummaryrefslogtreecommitdiff
path: root/include/action_list.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/action_list.h')
-rw-r--r--include/action_list.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/action_list.h b/include/action_list.h
index 14c733f..b6fd13a 100644
--- a/include/action_list.h
+++ b/include/action_list.h
@@ -3,6 +3,9 @@
#include <tak.h>
+#ifndef ACTION_LIST_H
+#define ACTION_LIST_H
+
enum A_TYPE { A_PLACE, A_MOVE };
typedef struct action_node_s {
@@ -14,15 +17,18 @@ typedef struct action_node_s {
} action_node_t;
typedef struct action_list_s {
- struct action_node_s *head;
+ struct action_node_s *head, *tail;
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);
+action_node_t *action_copy(const action_node_t* action);
void action_take(action_node_t *action);
void action_undo(action_node_t *action);
void action_to_ptn(action_node_t* action, char* out_ptn);
+
+#endif