Skat Engine und AI auf Haskell Basis
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

19 lignes
435B

  1. module AI.Stupid where
  2. import Player
  3. import Pile
  4. import Card
  5. data Stupid = Stupid { getTeam :: Team
  6. , getHand :: Hand }
  7. deriving Show
  8. instance Player Stupid where
  9. team = getTeam
  10. hand = getHand
  11. chooseCard p _ _ hand = do
  12. trumpCol <- trumpColour
  13. turnCol <- turnColour
  14. let possible = filter (isAllowed trumpCol turnCol hand) hand
  15. return (head possible, p)