Fresh RNG on each reload

This commit is contained in:
Jack Harley 2021-01-28 19:49:41 +00:00
parent 9d5414f9c2
commit f684ab77cd
1 changed files with 4 additions and 4 deletions

View File

@ -12,16 +12,16 @@ import Minesweeper
main :: IO ()
main = do
rng <- newStdGen
startGUI defaultConfig {jsStatic = Just "view"} $ setup rng
startGUI defaultConfig {jsStatic = Just "view"} setup
setup :: StdGen -> Window -> UI ()
setup rng w = void $ do
setup :: Window -> UI ()
setup w = void $ do
return w # set title "Minesweeper"
UI.addStyleSheet w "bootstrap.min.css"
UI.addStyleSheet w "minesweeper.css"
rng <- liftIO newStdGen
let board = createBoard 10 0.2 rng
getBody w #+ [