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

  1. module Datatypes.Game (Game(..), completed) where
  2. import Data.Set (Set)
  3. import Datatypes.Board (Board)
  4. import Datatypes.Unit (Unit)
  5. type UnitHash = Int
  6. data Game = Game {
  7. board :: Board,
  8. units :: [Unit],
  9. oldPositions :: Set UnitHash,
  10. oldLines :: Int,
  11. points :: Int
  12. }
  13. deriving Show
  14. completed :: Game -> Bool
  15. completed game = null $ units game