summaryrefslogtreecommitdiff
path: root/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs42
1 files changed, 8 insertions, 34 deletions
diff --git a/Main.hs b/Main.hs
index c21cdab..1244051 100644
--- a/Main.hs
+++ b/Main.hs
@@ -1,38 +1,12 @@
-import System.Random (getStdGen)
-import Card (fullDecks, showCard, shuffle)
-import Game (Game(..),
- players,
- playerIdx,
- attack,
- direction,
- stockPile,
- discardPile,
- prompt,
- dealCards,
- beginRounds,
- )
-import Player (Player(..))
-import qualified Player as P
-import Card (Card)
-import qualified Card as C
+import Game (Game(..), Setup(..), beginGame)
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 = 1
- , direction = 1
- , prevCard = head stock
- , stockPile = tail stock
- , discardPile = discard
- }
-
- beginRounds 3 True $ dealCards 6 game
+ let setup = Setup { playerN = 3
+ , roundN = 3
+ , deckN = 2
+ , cardN = 6
+ , autoMode = True
+ }
+ beginGame setup
return ()