Fresh RNG on each reload
This commit is contained in:
parent
9d5414f9c2
commit
f684ab77cd
|
@ -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 #+ [
|
||||
|
|
Loading…
Reference in New Issue