aboutsummaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorCharles <sircharlesaze@gmail.com>2020-06-28 08:34:16 +0200
committerCharles <sircharlesaze@gmail.com>2020-06-28 08:34:16 +0200
commitfeae9f442000cf218c249e6e163e8b5137771857 (patch)
tree4244ae75d5c39e8442d65c9357d66bf91924f6b3 /inc
parentb9c8bbac74bb828eeae033a54c1f25d1711cf66a (diff)
downloadhanoi-feae9f442000cf218c249e6e163e8b5137771857.tar.gz
hanoi-feae9f442000cf218c249e6e163e8b5137771857.tar.bz2
hanoi-feae9f442000cf218c249e6e163e8b5137771857.zip
Added player controls
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