conways-game-of-life/Main.hs
2022-04-08 00:54:06 -04:00

20 lines
448 B
Haskell

module Main where
import Control.Monad.Representable.Reader
import GOL.Space
import Graphics.Engine (initialSpace, run)
import Graphics.Gloss
import Graphics.GlossUtils (playYampa)
-- random space just to test things
space :: ToroidalSpace Bool
space = tabulate (\(x, y) -> (x + y `mod` 5) * 10 + x - y > 30)
main :: IO ()
main =
playYampa
(InWindow "Conway's Game of Life" (200, 200) (10, 10))
black
30
(run (200, 200) space)