Rather than parsing the whole board, keep a hashset or list of all the cells that are live. Then apply the rules to all of those cells and their neighbours. Should avoid needlessly checking dead cells.
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
replies: