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
36
37
38
|
import System.Random (getStdGen)
import Card (fullDecks, showCard, shuffle)
import Game (Game(..),
Direction(CCW, CW),
players,
playerIdx,
attack,
direction,
stockPile,
discardPile,
prompt,
dealCards,
advanceGame,
)
import Player (Player(..))
import qualified Player as P
import Card (Card)
import qualified Card as C
main :: IO ()
main = do
shuffleGen <- getStdGen
let stock = shuffle shuffleGen $ fullDecks 2
let discard = []
let defaultPlayers = [ Player "Alice" 0 []
, Player "Bob" 0 []
, Player "Carol" 0 []
]
let game = Game { players = defaultPlayers
, playerIdx = 0
, attack = 0
, direction = CCW
, stockPile = stock
, discardPile = discard
}
advanceGame $ dealCards 6 game
print ()
|