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
|