Add toggle_marking and simplify marking logic

Introduce a public `BoardState::toggle_marking` that flips the
marking mode and starts or clears marking accordingly. Refactor
`set_marked_cell` to accept tuple coordinates and clean up its
logic. Update `change_focused_cell` to work with the new signature
and use the toggle helper. Adjust cell display to show coordinates
when a cell is marked.
This commit is contained in:
2026-04-10 21:30:48 +02:00
parent 869ba0bb7f
commit d5f4d03264
3 changed files with 22 additions and 27 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ impl CellWidget {
}
fn display_coords(&self) -> Span<'_> {
if self.selected || self.tag != CellTag::Stone {
if self.selected || self.tag != CellTag::Stone || self.marked {
format!("{}{}", self.col_to_letters(), self.row).green()
} else {
"".to_span()