projects
/
avoidance.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c989c37
)
Eta-reduction for randomRange.
main
author
sabadev
<saba@sabadev.xyz>
Sat, 10 Apr 2021 04:17:48 +0000
(
00:17
-0400)
committer
sabadev
<saba@sabadev.xyz>
Sat, 10 Apr 2021 04:17:48 +0000
(
00:17
-0400)
src/Game.hs
patch
|
blob
|
history
diff --git
a/src/Game.hs
b/src/Game.hs
index
670f992
..
3bd4ab6
100644
(file)
--- a/
src/Game.hs
+++ b/
src/Game.hs
@@
-144,7
+144,7
@@
randomResult :: (Random a) => RandomState a
randomResult = randomAction random
randomRange :: (Random a) => (a, a) -> RandomState a
-randomRange
bounds = randomAction $ G.getRandom bounds
+randomRange
= randomAction . G.getRandom
enemyStartPosition :: Direction -> RandomState G.Coords
enemyStartPosition U = randomRange (fst topLeftBoundary, fst bottomRightBoundary) >>= \column -> return (snd bottomRightBoundary, column)