diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/life.cff | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/life.cff b/examples/life.cff index 8b58cf4..064f88c 100644 --- a/examples/life.cff +++ b/examples/life.cff @@ -8,15 +8,15 @@ static board Board = {}; fn get(b *Board, x uint, y uint) bool { x %= W; y %= H; let idx = x + (y * W); - return (*b)[idx / 8] & (1 << (idx % 8)) != 0; + return b.[idx / 8] & (1 << (idx % 8)) != 0; } fn set(b *Board, x uint, y uint, set bool) void { x %= W; y %= H; let idx = x + (y * W); - (*b)[idx / 8] &= ~(1 << (idx % 8)); + b.[idx / 8] &= ~(1 << (idx % 8)); if set { - (*b)[idx / 8] |= (1 << (idx % 8)); + b.[idx / 8] |= (1 << (idx % 8)); } } |