From f684ab77cde38fd0dfe67d51fe2afd292f13cffe Mon Sep 17 00:00:00 2001 From: Jack Harley Date: Thu, 28 Jan 2021 19:49:41 +0000 Subject: [PATCH] Fresh RNG on each reload --- src/Main.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Main.hs b/src/Main.hs index 025be17..521c314 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -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 #+ [