another bug gah
This commit is contained in:
parent
b1994c2764
commit
5ed1748595
1 changed files with 3 additions and 2 deletions
|
@ -115,11 +115,12 @@ impl Game {
|
|||
for y in 0..self.height {
|
||||
let dx = rng.random_range(-1..=1);
|
||||
let dy = rng.random_range(-1..=1);
|
||||
if dx == dy {
|
||||
let (ox, oy) = (x + dx, y + dy);
|
||||
|
||||
if (x, y) == (ox, oy) {
|
||||
continue;
|
||||
}
|
||||
|
||||
let (ox, oy) = (x + dx, y + dy);
|
||||
let Some(other) = self.at(ox, oy) else {
|
||||
continue;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue