Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: 57023c5dea
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (14 sloc) 0.432 kB
module Predicates where
import Types
import Data.Label
import qualified Data.Set as Set
-- Objects
hasColor :: Color -> Object -> Bool
hasColor c o = c `Set.member` get colors o
isOwnedBy :: Ref Player -> Object -> Bool
isOwnedBy rp o = rp == get owner o
isControlledBy :: Ref Player -> Object -> Bool
isControlledBy rp o = rp == get controller o
-- Zones
isInZone :: Zone -> Object -> Bool
isInZone z o = get zone o == z
Jump to Line
Something went wrong with that request. Please try again.