Since last time, I’ve switched from ncurses-rs to termion, mostly because getting everything to work in ncurses was a pain, and I didn’t need most of its features, anyways. Basic movement now works:
I’m a little concerned about mouse controls, mostly because each cell is so small—part of that is due to my setup, though.
The code is organized around a simple state machine, where each state
and each event is an
enum value, and the transition function just
pattern matches on the combination of the two. Eventually there will
be nested state machines, to handle things like switching between game
states (title, mission select, mission), turns (player, enemy), and UI
states (selected, unselected, etc).
Next up: leaving a trail as the program moves.