logoalt Hacker News

hiroakiaizawatoday at 9:02 AM1 replyview on HN

Interesting approach. I like that the implementation focuses on scalability rather than only visualization.


Replies

HarHarVeryFunnytoday at 2:31 PM

It's extremely inefficient, using pointers to neighboring cells.

If you want to handle the grid edges (whether for a wrap-around "infinite" grid, or not) without too much special code, then leave a 1-cell border around the grid and fill this with the appropriate data (empty cells, or wraparound cells). If you really want to be efficient then just write the special-case edge code.