blob: 5a6dbb0dd15807a015f1569cf40dbc88670a4faa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
const std = @import("std");
const IO = @import("frontend/ncurses.zig").IO;
const Action = @import("actions.zig").Action;
pub fn main() u8 {
var io = IO.init() catch |err| {
std.log.err("{}", .{err});
return 1;
};
defer io.deinit();
io.displayMessage("Initialized", .{});
var action = Action.illegal;
var tick_count: usize = 0;
while (action != Action.exit) {
io.displayMessage("{}", .{tick_count});
action = io.waitForTick();
switch (action) {
Action.tick => {
io.displayMessage("{}", .{tick_count});
tick_count += 1;
},
else => io.displayMessage("{}", .{tick_count}),
}
}
return 0;
}
|