merge undo/redo logic for areas and single tiles
This commit is contained in:
parent
6970b18e22
commit
ba1f404250
3 changed files with 14 additions and 49 deletions
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue