merge undo/redo logic for areas and single tiles

This commit is contained in:
Crispy 2024-12-16 22:24:27 +01:00
parent 6970b18e22
commit ba1f404250
3 changed files with 14 additions and 49 deletions

View file

@ -61,6 +61,14 @@ impl Board {
}
}
pub fn new_single(tile: Tile) -> Self {
Self {
rows: vec![vec![tile]],
width: 1,
height: 1,
}
}
pub fn new(rows: Vec<Vec<Tile>>) -> Self {
Self {
width: rows[0].len(),