player object

This commit is contained in:
2026-06-25 00:04:42 -05:00
parent d8a3f17379
commit db8c8e615d
15 changed files with 207 additions and 168 deletions
+3 -2
View File
@@ -10,6 +10,7 @@ fn init() {
log(`hello from object — player at ${Board.player_x}, ${Board.player_y}`);
set_tile(2); // change my glyph to ☻ — proves the write path
say("Hello there,\\ntraveller!");
log(`Player health: ${Player.health}`);
}
fn tick(dt) {
@@ -73,8 +74,8 @@ fn bump(id) {
]);
}
fn eat() {
log("You ate the muffin. Delicious.");
say("Mmm!");
say("Yeah it was poisoned.");
alter_health(-2);
}
fn ignore() {
log("You walk away from the muffin. Wise.");