|
@ -87,6 +87,7 @@ func start_conway() -> void: |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Check a cell against the Conway rules and return True if cell shoudl be alive |
|
|
## Check a cell against the Conway rules and return True if cell shoudl be alive |
|
|
|
|
|
## The logic in this could be cleaned up pretty easily. Only verbose for understanding. |
|
|
func cell_is_alive(pos: Vector2) -> bool: |
|
|
func cell_is_alive(pos: Vector2) -> bool: |
|
|
var neighbors := count_living_neighbors(pos) |
|
|
var neighbors := count_living_neighbors(pos) |
|
|
var currently_alive = world[pos.x][pos.y] is RID |
|
|
var currently_alive = world[pos.x][pos.y] is RID |
|
|