cleanup
This commit is contained in:
parent
db7a2b2418
commit
9bee7c0e10
5 changed files with 11 additions and 13 deletions
|
@ -174,7 +174,7 @@ impl Board {
|
|||
pub fn grow_to_include(&mut self, p: Pos) {
|
||||
let p = self.transform(p);
|
||||
if p.x < 0 {
|
||||
let len = p.x.abs() as usize;
|
||||
let len = p.x.unsigned_abs();
|
||||
for row in &mut self.rows {
|
||||
let mut new_row = vec![Tile::Blank; len];
|
||||
new_row.append(row);
|
||||
|
@ -191,7 +191,7 @@ impl Board {
|
|||
}
|
||||
|
||||
if p.y < 0 {
|
||||
let len = p.y.abs() as usize;
|
||||
let len = p.y.unsigned_abs();
|
||||
let mut new_rows = vec![vec![Tile::Blank; self.width]; len];
|
||||
new_rows.append(&mut self.rows);
|
||||
self.rows = new_rows;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue