rewrite power propagation
This commit is contained in:
parent
e6f99d3776
commit
e223a75c0e
5 changed files with 263 additions and 184 deletions
|
@ -101,16 +101,6 @@ impl Board {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_blank_mut(&mut self, p: Pos) -> Option<&mut Tile> {
|
||||
if self.in_bounds(p) {
|
||||
let tile = &mut self.rows[p.y as usize][p.x as usize];
|
||||
if let Tile::Open(OpenTile::Blank, _) = tile{
|
||||
return Some(tile);
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
pub fn set(&mut self, p: Pos, tile: Tile) {
|
||||
if self.in_bounds(p) {
|
||||
self.rows[p.y as usize][p.x as usize] = tile;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue