diff options
Diffstat (limited to 'ws2015')
-rw-r--r-- | ws2015/ffp/blaetter/11/GameUnits.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/ws2015/ffp/blaetter/11/GameUnits.hs b/ws2015/ffp/blaetter/11/GameUnits.hs index a47614e..d8853e9 100644 --- a/ws2015/ffp/blaetter/11/GameUnits.hs +++ b/ws2015/ffp/blaetter/11/GameUnits.hs | |||
@@ -70,7 +70,9 @@ battle att def = do | |||
70 | 70 | ||
71 | 71 | ||
72 | stockUnitShortcuts :: Q [Dec] | 72 | stockUnitShortcuts :: Q [Dec] |
73 | -- declares a constants of type Unit for each unit on the | 73 | -- declares a constants of type Unit for each unit on the stockUnitList |
74 | stockUnitShortcuts = undefined -- !!! TODO !!! | 74 | stockUnitShortcuts = sequence $ zipWith toDec ([0..] :: [Int]) stockUnitList |
75 | 75 | where | |
76 | \ No newline at end of file | 76 | toDec n c = valD (varP (mkName . uncapitalize $ name c)) (normalB [| stockUnitList !! $n' |]) [] |
77 | where | ||
78 | n' = litE . integerL $ toInteger n | ||