add ai system and a decent simulation based ai
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
module Player.Utils (
|
||||
isAllowed, isTrump
|
||||
) where
|
||||
|
||||
import Player
|
||||
import qualified Card as C
|
||||
import Card (Card)
|
||||
|
||||
isAllowed :: MonadPlayer m => [Card] -> Card -> m Bool
|
||||
isAllowed hand card = do
|
||||
trCol <- trumpColour
|
||||
turnCol <- turnColour
|
||||
return $ C.isAllowed trCol turnCol hand card
|
||||
|
||||
isTrump :: MonadPlayer m => Card -> m Bool
|
||||
isTrump card = do
|
||||
trCol <- trumpColour
|
||||
return $ C.isTrump trCol card
|
||||
Reference in New Issue
Block a user