fixed all warnings

This commit is contained in:
Shaun Kerr 2019-05-20 12:30:50 +12:00
parent 00928beda2
commit 61f9d76acc
5 changed files with 18 additions and 14 deletions

View File

@ -15,6 +15,7 @@ gCardLib =
, (S06_Gendo, ciS06_Gendo) , (S06_Gendo, ciS06_Gendo)
] ]
ciS01_Shinji :: CardInfo
ciS01_Shinji = CardInfo ciS01_Shinji = CardInfo
{ ciName = "3rd Child - Shinji Ikari" { ciName = "3rd Child - Shinji Ikari"
, ciFaction = Blue , ciFaction = Blue
@ -29,6 +30,7 @@ ciS01_Shinji = CardInfo
, ciNextInst = Nothing , ciNextInst = Nothing
} }
ciS02_Asuka :: CardInfo
ciS02_Asuka = CardInfo ciS02_Asuka = CardInfo
{ ciName = "2nd Child - Asuka Langley-Soryu" { ciName = "2nd Child - Asuka Langley-Soryu"
, ciFaction = Red , ciFaction = Red
@ -43,6 +45,7 @@ ciS02_Asuka = CardInfo
, ciNextInst = Nothing , ciNextInst = Nothing
} }
ciS03_Rei :: CardInfo
ciS03_Rei = CardInfo ciS03_Rei = CardInfo
{ ciName = "1st Child - Rei Ayanami" { ciName = "1st Child - Rei Ayanami"
, ciFaction = White , ciFaction = White
@ -57,6 +60,7 @@ ciS03_Rei = CardInfo
, ciNextInst = Nothing , ciNextInst = Nothing
} }
ciS04_Misato :: CardInfo
ciS04_Misato = CardInfo ciS04_Misato = CardInfo
{ ciName = "Misato Katsuragi" { ciName = "Misato Katsuragi"
, ciFaction = Green , ciFaction = Green
@ -71,6 +75,7 @@ ciS04_Misato = CardInfo
, ciNextInst = Nothing , ciNextInst = Nothing
} }
ciS05_Ritsuko :: CardInfo
ciS05_Ritsuko = CardInfo ciS05_Ritsuko = CardInfo
{ ciName = "Ritsuko Akagi" { ciName = "Ritsuko Akagi"
, ciFaction = Yellow , ciFaction = Yellow
@ -85,6 +90,7 @@ ciS05_Ritsuko = CardInfo
, ciNextInst = Nothing , ciNextInst = Nothing
} }
ciS06_Gendo :: CardInfo
ciS06_Gendo = CardInfo ciS06_Gendo = CardInfo
{ ciName = "Gendo Ikari" { ciName = "Gendo Ikari"
, ciFaction = Black , ciFaction = Black

View File

@ -3,6 +3,15 @@ module Groups where
import Util import Util
import Types import Types
-- Each factions corresponding Main Character
defCharsFaction :: Faction -> MainCharacter
defCharsFaction Blue = Shinji
defCharsFaction Red = Asuka
defCharsFaction White = Rei
defCharsFaction Green = Misato
defCharsFaction Yellow = Ritsuko
defCharsFaction Black = Gendo
-- Each characters default adjacents -- Each characters default adjacents
defFrens :: MainCharacter -> [MainCharacter] defFrens :: MainCharacter -> [MainCharacter]
defFrens Asuka = [Rei, Shinji, Misato] defFrens Asuka = [Rei, Shinji, Misato]

View File

@ -3,6 +3,7 @@ module Init where
import Types import Types
import Cards import Cards
initBS :: BoardState
initBS = BoardState initBS = BoardState
{ bsNeoTokyo = NeoTokyo { bsNeoTokyo = NeoTokyo
{ ntGroups = [ [Shinji], [Asuka], [Rei], [Misato], [Ritsuko], [Gendo] ] { ntGroups = [ [Shinji], [Asuka], [Rei], [Misato], [Ritsuko], [Gendo] ]

View File

@ -3,7 +3,6 @@ module Print where
import Types import Types
import Groups import Groups
import Data.List import Data.List
import Data.Either
printState :: BoardState -> IO () printState :: BoardState -> IO ()
printState bs = do printState bs = do
@ -11,9 +10,9 @@ printState bs = do
putStrLn " - Groups -" putStrLn " - Groups -"
mapM_ putStrLn $ let zipGroups = zip ['A', 'B'.. ] groups in mapM_ putStrLn $ let zipGroups = zip ['A', 'B'.. ] groups in
map map
(\(id, x) -> [id] ++ " ~ [ " ++ concatGroup x ++ " ] <-> " (\(gid, x) -> [gid] ++ " ~ [ " ++ concatGroup x ++ " ] <-> "
++ ++
(map fst $ filter (\(id,y) -> y `elem` (neighborGroups x groups)) zipGroups) (map fst $ filter (\(_,y) -> y `elem` (neighborGroups x groups)) zipGroups)
) zipGroups ) zipGroups
putStrLn " - Downed -" putStrLn " - Downed -"
mapM_ putStrLn $ map mapM_ putStrLn $ map

View File

@ -1,11 +0,0 @@
module State where
import Types
defCharsFaction :: Faction -> MainCharacter
defCharsFaction Blue = Shinji
defCharsFaction Red = Asuka
defCharsFaction White = Rei
defCharsFaction Green = Misato
defCharsFaction Yellow = Ritsuko
defCharsFaction Black = Gendo