pioneers/src/Map/Types.hs

49 lines
1.2 KiB
Haskell
Raw Normal View History

2014-02-08 12:01:40 +01:00
module Map.Types
where
import PioneerTypes
2014-02-09 20:18:03 +01:00
import Data.Array
2014-02-08 12:01:40 +01:00
2014-02-09 20:18:03 +01:00
type PlayMap = Array (XCoord, YCoord) Node
type XCoord = Int
type YCoord = Int
type ZCoord = Float
2014-02-08 12:01:40 +01:00
-- | Ownership information, Parameter to occupied is player number
data PlayerInfo = NoPlayer
| Occupied Int
-- | Path info, is this node part of a path?
data PathInfo = NoPath
| Path
| Border
-- | What resources can be harvested here?
data ResInfo = ResInfo Resource Amount
-- | What commodities are currently stored here?
data StorInfo = StorInfo Commodity Amount
-- | What kind of structures may be erected here?
data BuildInfo = BStruc Structure
| BFlag
| BSmall
| BMedium
| BLarge
data TileType = Ocean
| Beach
| Grass
| Desert
| Lake
| Hill -- ^ Accessible
| Mountain -- ^ Not accessible
deriving (Eq)
2014-02-09 20:18:03 +01:00
-- TODO: Record Syntax
data Node = Full (XCoord, YCoord) ZCoord TileType BuildInfo PlayerInfo PathInfo ResInfo StorInfo
| Minimal (XCoord, YCoord) ZCoord -- defaults to empty green grass node on height 0.5