Declare ID for Games

This commit is contained in:
Tissevert 2020-01-04 12:07:26 +01:00
parent 31ad94e5af
commit ce0f51720a
1 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,7 @@ import Control.Monad.IO.Class (MonadIO)
import Control.Monad.Writer (MonadWriter)
import Data.Map (Map)
import Hanafuda (Card, Flower, Pack)
import Hanafuda.ID (ID)
import Hanafuda.ID (ID, IDType(..), Prefix(..))
import qualified Hanafuda.KoiKoi.Yaku as KoiKoi (Score)
import qualified Hanafuda.Player as Player (ID, Players, Player, Scores, set)
@ -45,6 +45,8 @@ type PlayerID = Player.ID KoiKoi.Score
type Players = Player.Players KoiKoi.Score
type Scores = Player.Scores KoiKoi.Score
type GameID = ID Game
instance IDType Game where
prefix = Prefix "Game"
type PlayerTurn = Map PlayerID PlayerID
data Game = Game {