add preconfigured matches and extend online ai
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
module Skat.Matches (
|
||||
singleVsBots
|
||||
) where
|
||||
|
||||
import Control.Monad.State
|
||||
|
||||
import Skat
|
||||
import Skat.Operations
|
||||
import Skat.Player
|
||||
import Skat.Pile
|
||||
import Skat.Card
|
||||
|
||||
import Skat.AI.Rulebased
|
||||
import Skat.AI.Online
|
||||
import Skat.AI.Stupid
|
||||
|
||||
singleVsBots :: (Team -> Hand -> OnlineEnv) -> IO ()
|
||||
singleVsBots mkPlayer = do
|
||||
cards <- liftIO $ shuffleCards
|
||||
let ps = Players
|
||||
(PL $ mkPlayer Team Hand1)
|
||||
(PL $ Stupid Team Hand2)
|
||||
(PL $ mkAIEnv Single Hand3 10)
|
||||
env = SkatEnv (distribute cards) Nothing Spades ps
|
||||
liftIO $ evalStateT (turn Hand1 >>= publishGameResults) env
|
||||
Reference in New Issue
Block a user