aboutsummaryrefslogtreecommitdiff
path: root/src/actions.zig
diff options
context:
space:
mode:
authorjjanzen <jjanzen@jjanzen.ca>2025-01-21 23:26:23 -0600
committerjjanzen <jjanzen@jjanzen.ca>2025-01-21 23:26:23 -0600
commit900c8756edc3bc547dfd2cd47921ecd453bf703b (patch)
tree057be3b086c66bab292da8b2ae798e92f8db54b2 /src/actions.zig
parent385ca6511a8de0a4cc1dca774a3c743422c3d6be (diff)
doc comments and io refactor
Diffstat (limited to 'src/actions.zig')
-rw-r--r--src/actions.zig20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/actions.zig b/src/actions.zig
index 431a6d0..ac46574 100644
--- a/src/actions.zig
+++ b/src/actions.zig
@@ -1,13 +1,33 @@
+//! This module provides an enum of available actions in game including internal signals.
const std = @import("std");
+/// An enum of available actions in the game
pub const Action = enum {
+ /// Illegal action. Treated as a noop.
illegal,
+
+ /// One game tick has finished.
tick,
+
+ /// Exit the game.
exit,
+
+ /// Move the player character up one tile.
move_up,
+
+ /// Move the player character down one tile.
move_down,
+
+ /// Move the player character left one tile.
move_left,
+
+ /// Move the player character right one tile.
move_right,
+
+ /// The player character goes down a flight of stairs.
down_stair,
+
+ /// The player character goes up a flight of stairs.
+ /// (TODO: possibly merge with down_stair)
up_stair,
};