From a9843e59f2e9cfcb1be7c311065584829ae7593e Mon Sep 17 00:00:00 2001 From: Andrea Bellandi Date: Sat, 8 Aug 2015 23:30:23 +0200 Subject: [PATCH] deleted inizialization bug in JSONDeser.readInput --- src/Datatypes/Game.hs | 2 +- src/JSONDeser.hs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Datatypes/Game.hs b/src/Datatypes/Game.hs index 69bfaef..8480722 100644 --- a/src/Datatypes/Game.hs +++ b/src/Datatypes/Game.hs @@ -1,4 +1,4 @@ -module Datatypes.Game (Game(..), completed) where +module Datatypes.Game (Game(..), completed, new) where import Data.Hashable (hash) import Data.Set (Set) diff --git a/src/JSONDeser.hs b/src/JSONDeser.hs index 9bd115d..36d874c 100644 --- a/src/JSONDeser.hs +++ b/src/JSONDeser.hs @@ -7,6 +7,7 @@ import qualified Data.ByteString.Lazy as BS import Data.Aeson import GHC.Generics import qualified Datatypes as DT +import qualified Datatypes.Game as DT.Game import LCG @@ -50,7 +51,7 @@ readInputInternal str = if isJust result newGame :: Input -> (Int,[(Int,DT.Game)]) newGame input = (JSONDeser.id input, zip (sourceSeeds input) (map gameFromSeed (sourceSeeds input))) where - gameFromSeed seed = DT.Game board (seedUnits seed input) (Set.empty :: Set.Set Int) 0 0 + gameFromSeed seed = DT.Game.new board (seedUnits seed input) board = DT.Board w h filledel w = width input h = height input