From: sabadev Date: Sun, 31 Jan 2021 15:04:17 +0000 (-0500) Subject: Implemented the main method to allow the game to be run. X-Git-Url: http://sabadev.xyz:4321/?a=commitdiff_plain;h=fa94735b9fafa2652b1c3aa9e0790b4f801614ce;p=avoidance.git Implemented the main method to allow the game to be run. --- diff --git a/app/Main.hs b/app/Main.hs index 19c464c..821f4ea 100644 --- 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 --- 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