generated from GarandPLG/rust-flake-template
Add lifetime parameter and MarkedCells struct
Refactor App, GameStates, SkirmishState and BoardState to carry a generic lifetime `'a`. Introduce a new `MarkedCells` type that holds marking state and selected unit, replacing the previous `marking_cells` flag and raw deque. Update related methods, keybindings, view implementations and module exports to use the new structures.
This commit is contained in:
1 parent
b66c1d8e25
commit
cd1822d05e
11 files changed
+78
-38
No files matched your search
@@ -85,7 +85,7 @@ pub fn skirmish_keybindings(app: &mut App, key_event: &KeyEvent) {
|
||||
Action::Space => board.toggle_marking(),
|
||||
Action::Backspace => board.undo_marked_cell(),
|
||||
Action::Delete => {
|
||||
board.marking_cells = false;
|
||||
board.marked_cells.marking_cells = false;
|
||||
board.clear_marked_cells()
|
||||
}
|
||||
Action::Tab => {
|
||||
|
||||
Reference in new issue
Block a user