projects
/
avoidance.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2fd575
)
Implemented the main method to allow the game to be run.
author
sabadev
<saba@sabadev.xyz>
Sun, 31 Jan 2021 15:04:17 +0000
(10:04 -0500)
committer
sabadev
<saba@sabadev.xyz>
Sun, 31 Jan 2021 15:04:17 +0000
(10:04 -0500)
app/Main.hs
patch
|
blob
|
history
src/Game.hs
patch
|
blob
|
history
diff --git
a/app/Main.hs
b/app/Main.hs
index
19c464c
..
821f4ea
100644
(file)
--- a/
app/Main.hs
+++ b/
app/Main.hs
@@
-3,4
+3,4
@@
module Main where
import Game
main :: IO ()
-main =
putStrLn "Hello World"
+main =
getStdGen >>= playGame . gameSettings
diff --git
a/src/Game.hs
b/src/Game.hs
index
f5d7318
..
ad20b2c
100644
(file)
--- a/
src/Game.hs
+++ b/
src/Game.hs
@@
-1,4
+1,4
@@
-module Game where
+module Game
(gameSettings, G.getStdGen, G.playGame)
where
import Data.Bifunctor (bimap)
import Data.Char (toUpper)
@@
-87,7
+87,7
@@
shouldQuit :: State -> Bool
shouldQuit = stateIsQuitting
boundaries :: (G.Coords, G.Coords)
-boundaries = ((1, 1), (
24, 80
))
+boundaries = ((1, 1), (
80, 24
))
topLeftBoundary :: G.Coords
topLeftBoundary = fst boundaries