You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
417 B

module Datatypes.Game (Game(..), completed) where
import Data.Set (Set)
import Datatypes.Board (Board)
import Datatypes.Unit (Unit)
type UnitHash = Int
data Game = Game {
board :: Board,
units :: [Unit],
oldPositions :: Set UnitHash,
oldLines :: Int,
points :: Int
}
deriving Show
completed :: Game -> Bool
completed game = null $ units game