introduce stack build system and restructure code

This commit is contained in:
2019-08-26 11:46:20 +02:00
parent da217b5196
commit 08e94e4386
25 changed files with 762 additions and 163 deletions
+18
View File
@@ -0,0 +1,18 @@
module Skat.Player.Utils (
isAllowed, isTrump
) where
import Skat.Player
import qualified Skat.Card as C
import Skat.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