The Game of Life is one of my favorite programs, but I've never tried to go deep in learning about it, and as a result I still learn fairly obvious (with hindsight) things about it. This time after https://akkartik.itch.io/carousel/devlog/650868/conways-game-of-life I realized two things:
* I don't need to keep checking if a cell is in bounds. Just don't update a border of cells!
* I don't need to clean up the new array at each time step! 🤦
Conway's Game of Life
Perhaps my favorite program. curr, new = {}, {} for x=1,Safe_width do table.insert(curr, {}) table.insert(new, {}) for y=1,Safe_height do table.insert(curr[x], 0) table.insert(new[x], 0) end end -- R...Kartik Agaram (itch.io)
Devine Lu Linvega
in reply to Kartik Agaram • • •Kartik Agaram
in reply to Devine Lu Linvega • • •Devine Lu Linvega
in reply to Kartik Agaram • • •XXIIVV — wireworld
wiki.xxiivv.comKartik Agaram
in reply to Devine Lu Linvega • • •Devine Lu Linvega
in reply to Kartik Agaram • • •