game-of-life: use row directly in next-step.

windows-high-dpi
John Benediktsson 2018-03-11 17:05:47 -07:00
parent b29a99d03f
commit 18a3bd0c4c
1 changed files with 2 additions and 8 deletions

View File

@ -56,15 +56,9 @@ IN: game-of-life
row { bit-array } declare [| cell i |
i neighbor-row nth-unsafe
cell [
2 3 between? i j grid
{ array } declare nth-unsafe
{ bit-array } declare set-nth-unsafe
2 3 between? i row set-nth-unsafe
] [
3 = [
t i j grid
{ array } declare nth-unsafe
{ bit-array } declare set-nth-unsafe
] when
3 = [ t i row set-nth-unsafe ] when
] if
] each-index
] each-index ;