Open late-goodbye opened 5 years ago
Input data type: [[((x :: Int, y :: Int), (present_state :: Bool, future_state :: Bool))]]
I think the data type could be simply a 2D Bool matrix or something like a sparse matrix
I think the data type could be simply a 2D Bool matrix or something like a sparse matrix
You're right. Then [(x :: Int, y :: Int)] if we will draw picture just at the moment the separate matrix was generated or [[(x :: Int, y :: Int)]] in case of generating .gif animation after a simulation is finished.
I suppose the most cells on a map will be not active, so the sparse matrix is better solutuon.
As I understand, a transmission of the whole set of matrices is a simpler option to be implemented, so I suggest this way.
The module uses 2D matrix to generate a .gif picture. Each matrix cell is bool value. The picture represents each value as a black pixel if the value os true and a white pixel otherwise.