Merged Types with PioneerTypes
This commit is contained in:
parent
b7fef589a9
commit
313992efaf
@ -1,7 +1,7 @@
|
||||
module Map.Types
|
||||
where
|
||||
|
||||
import PioneerTypes
|
||||
import Types
|
||||
|
||||
import Data.Array
|
||||
|
||||
|
@ -1,62 +0,0 @@
|
||||
module PioneerTypes
|
||||
where
|
||||
|
||||
data Structure = Flag -- Flag
|
||||
| Woodcutter -- Huts
|
||||
| Forester
|
||||
| Stonemason
|
||||
| Fisher
|
||||
| Hunter
|
||||
| Barracks
|
||||
| Guardhouse
|
||||
| LookoutTower
|
||||
| Well
|
||||
| Sawmill -- Houses
|
||||
| Slaughterhouse
|
||||
| Mill
|
||||
| Bakery
|
||||
| IronSmelter
|
||||
| Metalworks
|
||||
| Armory
|
||||
| Mint
|
||||
| Shipyard
|
||||
| Brewery
|
||||
| Storehouse
|
||||
| Watchtower
|
||||
| Catapult
|
||||
| GoldMine -- Mines
|
||||
| IronMine
|
||||
| GraniteMine
|
||||
| CoalMine
|
||||
| Farm -- Castles
|
||||
| PigFarm
|
||||
| DonkeyBreeder
|
||||
| Harbor
|
||||
| Fortress
|
||||
deriving (Show, Eq)
|
||||
|
||||
data Amount = Infinite -- Neverending supply
|
||||
| Finite Int -- Finite supply
|
||||
|
||||
-- Extremely preliminary, expand when needed
|
||||
data Commodity = WoodPlank
|
||||
| Sword
|
||||
| Fish
|
||||
deriving Eq
|
||||
|
||||
data Resource = Coal
|
||||
| Iron
|
||||
| Gold
|
||||
| Granite
|
||||
| Water
|
||||
| Fishes
|
||||
deriving (Show, Eq)
|
||||
|
||||
instance Show Amount where
|
||||
show (Infinite) = "inexhaustable supply"
|
||||
show (Finite n) = show n ++ " left"
|
||||
|
||||
instance Show Commodity where
|
||||
show WoodPlank = "wooden plank"
|
||||
show Sword = "sword"
|
||||
show Fish = "fish"
|
62
src/Types.hs
62
src/Types.hs
@ -139,5 +139,65 @@ $(makeLenses ''Position)
|
||||
$(makeLenses ''Env)
|
||||
$(makeLenses ''UIState)
|
||||
|
||||
|
||||
type Pioneers = RWST Env () State IO
|
||||
|
||||
data Structure = Flag -- Flag
|
||||
| Woodcutter -- Huts
|
||||
| Forester
|
||||
| Stonemason
|
||||
| Fisher
|
||||
| Hunter
|
||||
| Barracks
|
||||
| Guardhouse
|
||||
| LookoutTower
|
||||
| Well
|
||||
| Sawmill -- Houses
|
||||
| Slaughterhouse
|
||||
| Mill
|
||||
| Bakery
|
||||
| IronSmelter
|
||||
| Metalworks
|
||||
| Armory
|
||||
| Mint
|
||||
| Shipyard
|
||||
| Brewery
|
||||
| Storehouse
|
||||
| Watchtower
|
||||
| Catapult
|
||||
| GoldMine -- Mines
|
||||
| IronMine
|
||||
| GraniteMine
|
||||
| CoalMine
|
||||
| Farm -- Castles
|
||||
| PigFarm
|
||||
| DonkeyBreeder
|
||||
| Harbor
|
||||
| Fortress
|
||||
deriving (Show, Eq)
|
||||
|
||||
data Amount = Infinite -- Neverending supply
|
||||
| Finite Int -- Finite supply
|
||||
|
||||
-- Extremely preliminary, expand when needed
|
||||
data Commodity = WoodPlank
|
||||
| Sword
|
||||
| Fish
|
||||
deriving Eq
|
||||
|
||||
data Resource = Coal
|
||||
| Iron
|
||||
| Gold
|
||||
| Granite
|
||||
| Water
|
||||
| Fishes
|
||||
deriving (Show, Eq)
|
||||
|
||||
instance Show Amount where
|
||||
show (Infinite) = "inexhaustable supply"
|
||||
show (Finite n) = show n ++ " left"
|
||||
|
||||
instance Show Commodity where
|
||||
show WoodPlank = "wooden plank"
|
||||
show Sword = "sword"
|
||||
show Fish = "fish"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user