Fresh RNG on each reload
This commit is contained in:
parent
9d5414f9c2
commit
f684ab77cd
|
@ -12,16 +12,16 @@ import Minesweeper
|
||||||
|
|
||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
rng <- newStdGen
|
startGUI defaultConfig {jsStatic = Just "view"} setup
|
||||||
startGUI defaultConfig {jsStatic = Just "view"} $ setup rng
|
|
||||||
|
|
||||||
setup :: StdGen -> Window -> UI ()
|
setup :: Window -> UI ()
|
||||||
setup rng w = void $ do
|
setup w = void $ do
|
||||||
return w # set title "Minesweeper"
|
return w # set title "Minesweeper"
|
||||||
|
|
||||||
UI.addStyleSheet w "bootstrap.min.css"
|
UI.addStyleSheet w "bootstrap.min.css"
|
||||||
UI.addStyleSheet w "minesweeper.css"
|
UI.addStyleSheet w "minesweeper.css"
|
||||||
|
|
||||||
|
rng <- liftIO newStdGen
|
||||||
let board = createBoard 10 0.2 rng
|
let board = createBoard 10 0.2 rng
|
||||||
|
|
||||||
getBody w #+ [
|
getBody w #+ [
|
||||||
|
|
Loading…
Reference in New Issue