Skip to content
This repository
tree: cdc74d0b3c
Fetching contributors…

Cannot retrieve contributors at this time

file 18 lines (11 sloc) 0.352 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
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 :: PlayerRef -> Object -> Bool
isOwnedBy pr o = pr == get owner o

isControlledBy :: PlayerRef -> Object -> Bool
isControlledBy pr o = pr == get controller o
Something went wrong with that request. Please try again.