1
Fork 0
solar-conflux/purescript/canopy/src/DipMap.purs
2023-10-29 00:44:23 +02:00

29 lines
444 B
Plaintext

module Canopy.DipMap where
import Canopy.Graph (Graph)
import Data.List (List)
import Data.Maybe (Maybe)
newtype DipUnit c = DipUnit
{ nation :: c
, isFleet :: Boolean
}
newtype Territory c = Territory
{ isSea :: Boolean
, unit :: Maybe (DipUnit c)
}
type DipMap c = Graph (Territory c)
-- Index in some DipMap
type Loc = Int
data Move
= Attack Loc
| Support Loc Loc
| Convoy Loc Loc
| Hold
type DipMoves = List Move