diff options
| author | 2022-08-24 18:03:02 +0200 | |
|---|---|---|
| committer | 2022-08-24 18:03:02 +0200 | |
| commit | ee1bbd0204064a20cbf89003da15151f1214fb2a (patch) | |
| tree | 40dd207ab44b0a8e833414e648ed8f35ba2c0497 /examples/life.cff | |
| parent | a61dd9694409ef82fd24178bc99a794df55e1f04 (diff) | |
i don't know how to use phi nodes sorry
Diffstat (limited to 'examples/life.cff')
| -rw-r--r-- | examples/life.cff | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/examples/life.cff b/examples/life.cff index 791916f..e9c4dce 100644 --- a/examples/life.cff +++ b/examples/life.cff @@ -29,12 +29,7 @@ fn next(b *Board) void { + C(-1, 0) + C(1, 0) + C(-1, 1) + C(0, 1) + C(1, 1); - set(b, x, y, #f); - if get(&temp, x, y) { - set(b, x, y, n == 3); - } else if n == 2 or n == 3 { - set(b, x, y, #t); - } + set(b, x, y, get(&temp, x, y) ? n == 3 : (n == 2 or n == 3)); } } } |