diff options
Diffstat (limited to 'src/cell.rs')
-rw-r--r-- | src/cell.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cell.rs b/src/cell.rs index d5d19e2..fc5d77d 100644 --- a/src/cell.rs +++ b/src/cell.rs @@ -69,7 +69,7 @@ impl Cell { pub fn insert(mut cell_query: Query<(&mut Cell, &mut TextureAtlasSprite)>) { for (mut cell, mut sprite) in cell_query.iter_mut() { - if cell.occupant == Occupant::None && cell.y == constants::ROWS - 1 { + if cell.occupant == Occupant::None && cell.y == constants::GRID_SIZE - 1 { cell.occupant = rand::random(); sprite.index = cell.occupant.to_index(); } @@ -88,7 +88,7 @@ pub fn start_explosion( } pub fn check(mut cell_query: Query<(&mut Cell, &mut TextureAtlasSprite)>) { - let mut cells = [[Cell::default(); constants::COLUMNS]; constants::ROWS]; + let mut cells = [[Cell::default(); constants::GRID_SIZE]; constants::GRID_SIZE]; for (cell, _) in cell_query.iter_mut() { cells[cell.x][cell.y] = *cell; } @@ -98,7 +98,7 @@ pub fn check(mut cell_query: Query<(&mut Cell, &mut TextureAtlasSprite)>) { for (i, _) in cells.iter().enumerate() { let mut c = Vec::new(); - for j in 0..constants::ROWS { + for j in 0..constants::GRID_SIZE { if cells[i][j].occupant == last && last != Occupant::None { c.push((i, j)); c.push((i, j - 1)); |