From c856496ffc2c7d1cdb56da97273235af4a2b9f88 Mon Sep 17 00:00:00 2001 From: Shaun Kerr Date: Tue, 21 May 2019 12:12:23 +1200 Subject: [PATCH] betterish card stack stuff --- Connect.hs | 2 +- Init.hs | 2 +- Types.hs | 10 ++++++++-- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Connect.hs b/Connect.hs index f70e4fb..bc8a4a2 100644 --- a/Connect.hs +++ b/Connect.hs @@ -24,7 +24,7 @@ import Players -- | otherwise = oldBoardState -- { bsGameLog = (bsGameLog oldBoardState) -- ++ [ Left (playerName p oldBoardState) ++ " announced " ++ (getCardLine l) ++ ", moved to active" ] --- , +-- , bsCardStack -- TODO -- * manipulate the card stack after writing it diff --git a/Init.hs b/Init.hs index 22b0780..888e7cc 100644 --- a/Init.hs +++ b/Init.hs @@ -30,7 +30,7 @@ initBS = BoardState ] , bsActivePlayers = [1,2] , bsPriorityPlayer = 1 - , bsCardStack = [] + , bsActiveLine = Nothing , bsCardLib = gCardLib , bsGameLog = [] } diff --git a/Types.hs b/Types.hs index 1301e95..0027b63 100644 --- a/Types.hs +++ b/Types.hs @@ -12,7 +12,13 @@ data CardSym = S01_Shinji | S02_Asuka | S03_Rei | S04_Misato | S05_Ritsuko | S06 type CardLib = [(CardSym, CardInfo)] type Downed = [MainCharacter] type PutCards = [(Either MainCharacter MainEva, CardSym)] -type CardStack = [(PlayerId, CardSym)] +type ActiveLine = Maybe LineMeta +data LineMeta = LineMeta + { cmCardSym :: CardSym + , cmOwner :: PlayerId + , cmTarget :: MainCharacter + , cmLineMark :: LineMark + } data NeoTokyo = NeoTokyo { ntGroups :: Groups , ntEvas :: Evas @@ -29,7 +35,7 @@ data BoardState = BoardState , bsPlayerLib :: PlayerLib , bsActivePlayers :: ActivePlayers , bsPriorityPlayer :: PriorityPlayer - , bsCardStack :: CardStack + , bsActiveLine :: ActiveLine , bsCardLib :: CardLib , bsGameLog :: GameLog }