publish info on game start
This commit is contained in:
+1
-1
@@ -22,4 +22,4 @@ singleVsBots mkPlayer = do
|
||||
(PL $ Stupid Team Hand2)
|
||||
(PL $ mkAIEnv Single Hand3 10)
|
||||
env = SkatEnv (distribute cards) Nothing Spades ps
|
||||
liftIO $ evalStateT (turn Hand1 >>= publishGameResults) env
|
||||
liftIO $ evalStateT (publishGameStart Hand3 >> turn Hand1 >>= publishGameResults) env
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
module Skat.Operations (
|
||||
turn, turnGeneric, play, playOpen, publishGameResults
|
||||
turn, turnGeneric, play, playOpen, publishGameResults,
|
||||
publishGameStart
|
||||
) where
|
||||
|
||||
import Control.Monad.State
|
||||
@@ -93,3 +94,8 @@ publishGameResults :: (Int, Int) -> Skat ()
|
||||
publishGameResults res = do
|
||||
pls <- gets players
|
||||
mapM_ (\p -> onGameResults p res) (playersToList pls)
|
||||
|
||||
publishGameStart :: Hand -> Skat ()
|
||||
publishGameStart sglPlayer = do
|
||||
pls <- gets players
|
||||
mapM_ (\p -> onGameStart p sglPlayer) (playersToList pls)
|
||||
|
||||
Reference in New Issue
Block a user