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