From fa94735b9fafa2652b1c3aa9e0790b4f801614ce Mon Sep 17 00:00:00 2001 From: sabadev Date: Sun, 31 Jan 2021 10:04:17 -0500 Subject: [PATCH] Implemented the main method to allow the game to be run. --- app/Main.hs | 2 +- src/Game.hs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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 -- 2.20.1