Update PlayerID type to follow recent change in main lib
This commit is contained in:
parent
0c7e4c8b50
commit
48f6ab65ab
2 changed files with 7 additions and 7 deletions
|
@ -13,10 +13,10 @@ import Hanafuda (
|
||||||
, cardsOf, cardsOfPack, contains, empty,flower, packOfCards, sameMonth, size, union
|
, cardsOf, cardsOfPack, contains, empty,flower, packOfCards, sameMonth, size, union
|
||||||
)
|
)
|
||||||
import Hanafuda.Player (Player(..), Players(..))
|
import Hanafuda.Player (Player(..), Players(..))
|
||||||
import Hanafuda.KoiKoi (GameBlueprint(..), Move(..), PlayerKey, Step(..), Score)
|
import Hanafuda.KoiKoi (GameBlueprint(..), Move(..), PlayerID, Step(..), Score)
|
||||||
import Hanafuda.Message (PublicGame)
|
import Hanafuda.Message (PublicGame)
|
||||||
|
|
||||||
move :: PlayerKey -> PublicGame -> Move
|
move :: PlayerID -> PublicGame -> Move
|
||||||
|
|
||||||
move me (Game {step = ToPlay, month, players = Players p, river}) =
|
move me (Game {step = ToPlay, month, players = Players p, river}) =
|
||||||
case getAvailableCards myHand (cardsOfPack river) of
|
case getAvailableCards myHand (cardsOfPack river) of
|
||||||
|
|
|
@ -15,7 +15,7 @@ import Control.Concurrent (threadDelay)
|
||||||
import Control.Monad.Reader (ReaderT, ask)
|
import Control.Monad.Reader (ReaderT, ask)
|
||||||
import Control.Monad.State (StateT)
|
import Control.Monad.State (StateT)
|
||||||
import Control.Monad.Trans (lift)
|
import Control.Monad.Trans (lift)
|
||||||
import Hanafuda.KoiKoi (Game, GameBlueprint(..), PlayerKey, Step(..))
|
import Hanafuda.KoiKoi (Game, GameBlueprint(..), PlayerID, Step(..))
|
||||||
import qualified Hanafuda.Message as Message (T(..), FromClient(..), PublicGame)
|
import qualified Hanafuda.Message as Message (T(..), FromClient(..), PublicGame)
|
||||||
import Network.WebSockets (Connection, receiveData, sendTextData)
|
import Network.WebSockets (Connection, receiveData, sendTextData)
|
||||||
import Prelude hiding (error, putStrLn)
|
import Prelude hiding (error, putStrLn)
|
||||||
|
@ -24,16 +24,16 @@ import System.Exit (exitSuccess)
|
||||||
data State =
|
data State =
|
||||||
Initial
|
Initial
|
||||||
| Connected {
|
| Connected {
|
||||||
key :: PlayerKey
|
key :: PlayerID
|
||||||
}
|
}
|
||||||
| LoggedIn {
|
| LoggedIn {
|
||||||
key :: PlayerKey
|
key :: PlayerID
|
||||||
, name :: Text
|
, name :: Text
|
||||||
}
|
}
|
||||||
| Playing {
|
| Playing {
|
||||||
key :: PlayerKey
|
key :: PlayerID
|
||||||
, name :: Text
|
, name :: Text
|
||||||
, against :: PlayerKey
|
, against :: PlayerID
|
||||||
}
|
}
|
||||||
deriving Show
|
deriving Show
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue