diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-13 22:17:22 +0100 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-13 22:17:22 +0100 |
| commit | f34565aa32dc7badab76cf199e4d0b8cc22c2b05 (patch) | |
| tree | 7e9ff1d2c948212b6d3f7e1075b54ff5578befc5 | |
| parent | 605f2c807115baff10efa27f0d3348ef952b969f (diff) | |
| download | uni-f34565aa32dc7badab76cf199e4d0b8cc22c2b05.tar uni-f34565aa32dc7badab76cf199e4d0b8cc22c2b05.tar.gz uni-f34565aa32dc7badab76cf199e4d0b8cc22c2b05.tar.bz2 uni-f34565aa32dc7badab76cf199e4d0b8cc22c2b05.tar.xz uni-f34565aa32dc7badab76cf199e4d0b8cc22c2b05.zip | |
FFP 11.4
| -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 | ||
