Browse Source

Fix predator and prey so that growth is again possible.

master
Juergen Stuber 2 years ago
parent
commit
6009f627ae
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      src/bin/predprey/main.rs

+ 1
- 1
src/bin/predprey/main.rs View File

@ -74,7 +74,7 @@ fn grow(board: &Board, pos: Point2d, grow: Square, die: Square) -> Square {
for dir in Vec2d::directions() {
let pos1 = pos + dir;
if board.rect().contains(pos1) {
let neigh_sq = board.get(pos);
let neigh_sq = board.get(pos1);
if neigh_sq == grow {
return grow;
}


Loading…
Cancel
Save