aboutsummaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/hanoi.h6
-rw-r--r--inc/tower.h12
2 files changed, 16 insertions, 2 deletions
diff --git a/inc/hanoi.h b/inc/hanoi.h
index 6d71f11..1953499 100644
--- a/inc/hanoi.h
+++ b/inc/hanoi.h
@@ -5,4 +5,10 @@
# include "tower.h"
+enum e_mode
+{
+ MODE_SELECT_FROM,
+ MODE_SELECT_TO,
+};
+
#endif
diff --git a/inc/tower.h b/inc/tower.h
index 88876f8..da3fb1e 100644
--- a/inc/tower.h
+++ b/inc/tower.h
@@ -6,7 +6,7 @@
/* By: charles <charles.cabergs@gmail.com> /o o \ */
/* / v \ */
/* Created: 2020/06/27 14:06:50 by charles / _ \ */
-/* Updated: 2020/06/27 16:19:32 by charles '-----------' */
+/* Updated: 2020/06/28 08:12:37 by charles '-----------' */
/* */
/* ************************************************************************** */
@@ -28,8 +28,16 @@ typedef struct
size_t len;
} t_tower;
+enum e_highlight
+{
+ HIGHLIGHT_NONE = 0,
+ HIGHLIGHT_FROM = 1 << 0,
+ HIGHLIGHT_CURRENT = 1 << 1,
+};
+
void towers_init(t_tower towers[3], size_t disk_num);
void towers_move(t_tower towers[3], size_t from, size_t to);
-void tower_put(t_tower *tower, WINDOW *win, int highlight_level);
+void tower_put(t_tower *tower, WINDOW *win, enum e_highlight highlight_level);
+uint8_t tower_peek(t_tower *tower);
#endif