parse negative constants
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
func rule110_step[state: Array] : Array
|
||||
func rule110_step[state: Array] : void
|
||||
new_state := []
|
||||
|
||||
for i in 0..state->size
|
||||
@@ -12,7 +12,8 @@ func rule110_step[state: Array] : Array
|
||||
|
||||
array.push(new_state, !((!left && !center && !right) || (left && !center && !right) || (left && center && right)))
|
||||
|
||||
return new_state
|
||||
mem.copy(new_state->data, state->data, state->size * 8)
|
||||
array.free(new_state)
|
||||
|
||||
func print_state[state: Array]: void
|
||||
for i in 0..state->size
|
||||
@@ -32,7 +33,7 @@ func main[] : i64
|
||||
|
||||
print_state(state)
|
||||
for i in 0..SIZE
|
||||
state = rule110_step(state)
|
||||
rule110_step(state)
|
||||
print_state(state)
|
||||
|
||||
array.free(state)
|
||||
|
||||
Reference in New Issue
Block a user