wolf-tickets / conways-fight-for-survival

A nasty, short and brutish reimagining of Conway's Game of Life using Haskell.
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

Data structures #3

Open wolf-tickets opened 5 years ago

wolf-tickets commented 5 years ago

How should we represent the grid? We have discussed quad-tree, 2D array, 1D array. I suggest we pseudocode these implementations and figure out which is most likely to have the best time complexity - space complexity probably won't be an issue.

wolf-tickets commented 5 years ago

OK, we're doing quad tree. @McTano and @wolf-tickets will implement this ASAP - for Sunday Oct 14.

wolf-tickets commented 5 years ago

Individual cells: this should be a simple 4-tuple: (Bool, Int, Int, Int). We might want to think about defining an 8-bit concrete type of the Integral type class to reduce complexity, since we only need values 0-255.

We can also use one of GHC's built-in Word types, which are 8-bit.