1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
import System.Random (getStdGen)
import Card (fullDecks, showCard, shuffle)
import Game (Game(..),
Direction(CCW, CW),
players,
playerIdx,
attack,
direction,
stockPile,
discardPile,
prompt,
)
import Player (Player(..))
import qualified Player as P
import Card (Card)
import qualified Card as C
main :: IO ()
main = do
gen <- getStdGen
let stock = shuffle gen $ fullDecks 2
let discard = []
let defaultPlayers = [ Player "Alice" 0 $ take 6 $ fullDecks 1
, Player "Bob" 0 $ take 6 $ fullDecks 1
, Player "Carol" 0 $ take 6 $ fullDecks 1
]
let game = Game { players = defaultPlayers
, playerIdx = 0
, attack = 0
, direction = CCW
, stockPile = stock
, discardPile = discard
}
card <- prompt game
print card
|