Declare ID for Games
This commit is contained in:
parent
31ad94e5af
commit
ce0f51720a
1 changed files with 3 additions and 1 deletions
|
@ -25,7 +25,7 @@ import Control.Monad.IO.Class (MonadIO)
|
||||||
import Control.Monad.Writer (MonadWriter)
|
import Control.Monad.Writer (MonadWriter)
|
||||||
import Data.Map (Map)
|
import Data.Map (Map)
|
||||||
import Hanafuda (Card, Flower, Pack)
|
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.KoiKoi.Yaku as KoiKoi (Score)
|
||||||
import qualified Hanafuda.Player as Player (ID, Players, Player, Scores, set)
|
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 Players = Player.Players KoiKoi.Score
|
||||||
type Scores = Player.Scores KoiKoi.Score
|
type Scores = Player.Scores KoiKoi.Score
|
||||||
type GameID = ID Game
|
type GameID = ID Game
|
||||||
|
instance IDType Game where
|
||||||
|
prefix = Prefix "Game"
|
||||||
type PlayerTurn = Map PlayerID PlayerID
|
type PlayerTurn = Map PlayerID PlayerID
|
||||||
|
|
||||||
data Game = Game {
|
data Game = Game {
|
||||||
|
|
Loading…
Reference in a new issue