packages feed

labyrinth-server 0.1.2.0 → 0.1.3.0

raw patch · 3 files changed

+7/−11 lines, 3 filesdep ~labyrinth

Dependency ranges changed: labyrinth

Files

labyrinth-server.cabal view
@@ -1,5 +1,5 @@ name:                labyrinth-server-version:             0.1.2.0+version:             0.1.3.0 synopsis:            A complicated turn-based game - Web server description:         Players take turns in a labyrinth, competing with each                      other to pick a treasure and carry it out. They only know@@ -25,7 +25,7 @@                      , LabyrinthServer.Data   build-depends:       base >= 4.5 && < 4.7 -                     , labyrinth >= 0.4.2.0 && < 0.5+                     , labyrinth >= 0.5.0.0 && < 0.6                       , mtl ==2.1.*                      , template-haskell >= 2.7 && < 2.9@@ -59,7 +59,7 @@   main-is:             TestMain.hs   build-depends:       base >= 4.5 && < 4.7 -                     , labyrinth >= 0.4.2.0 && < 0.5+                     , labyrinth >= 0.5.0.0 && < 0.6                       , mtl ==2.1.*                      , template-haskell >= 2.7 && < 2.9
src/LabyrinthServer.hs view
@@ -218,7 +218,9 @@ newGameForm :: Html             -> MForm Handler (FormResult LabyrinthParams, Widget) newGameForm = renderDivs $ LabyrinthParams-    <$> areq intField (named "width") Nothing+    <$> (LabyrinthFeatures <$> areq checkBoxField (named "pits") (Just True)+                           <*> areq checkBoxField (named "rivers") (Just True))+    <*> areq intField (named "width") Nothing     <*> areq intField (named "height") Nothing     <*> areq intField (named "players") Nothing 
src/LabyrinthServer/Data.hs view
@@ -107,16 +107,10 @@     put st'     return r -data LabyrinthParams = LabyrinthParams { lpwidth   :: Int-                                       , lpheight  :: Int-                                       , lpplayers :: Int-                                       }- createLabyrinth :: (MonadIO m) => LabyrinthParams -> m Labyrinth createLabyrinth p = do     gen <- liftIO getStdGen-    let (l, gen') = generateLabyrinth-                        (lpwidth p) (lpheight p) (lpplayers p) gen+    let (l, gen') = generateLabyrinth p gen     liftIO $ setStdGen gen'     return l