2021-12-11 15:13:39 -05:00
|
|
|
module Main where
|
|
|
|
|
2021-12-28 18:16:51 -05:00
|
|
|
import Control.Monad.Representable.Reader
|
|
|
|
import GOL.Space
|
|
|
|
import Graphics.Engine (initialSpace, run)
|
|
|
|
import Graphics.Gloss
|
|
|
|
import Graphics.GlossUtils (playYampa)
|
|
|
|
|
2022-04-08 00:54:06 -04:00
|
|
|
-- random space just to test things
|
2021-12-28 18:16:51 -05:00
|
|
|
space :: ToroidalSpace Bool
|
2021-12-29 21:07:01 -05:00
|
|
|
space = tabulate (\(x, y) -> (x + y `mod` 5) * 10 + x - y > 30)
|
2021-12-20 00:59:04 -05:00
|
|
|
|
2021-12-11 15:13:39 -05:00
|
|
|
main :: IO ()
|
2021-12-29 21:07:01 -05:00
|
|
|
main =
|
|
|
|
playYampa
|
|
|
|
(InWindow "Conway's Game of Life" (200, 200) (10, 10))
|
|
|
|
black
|
|
|
|
30
|
2022-04-08 00:54:06 -04:00
|
|
|
(run (200, 200) space)
|