From 1af793b5ab3ecf884728c447f5c9a13e7ebff514 Mon Sep 17 00:00:00 2001 From: Javran Cheng Date: Tue, 14 Oct 2014 23:17:26 -0400 Subject: [PATCH] System.Game -> Game --- h2048.cabal | 8 ++++---- src/{System => }/Game/H2048/Core.hs | 6 +++--- src/{System => }/Game/H2048/UI/Simple.hs | 6 +++--- src/{System => }/Game/H2048/UI/Vty.hs | 6 +++--- src/{System => }/Game/H2048/Utils.hs | 4 ++-- src/MainSimple.hs | 2 +- src/MainVty.hs | 2 +- src/Test.hs | 2 +- 8 files changed, 18 insertions(+), 18 deletions(-) rename src/{System => }/Game/H2048/Core.hs (98%) rename src/{System => }/Game/H2048/UI/Simple.hs (98%) rename src/{System => }/Game/H2048/UI/Vty.hs (98%) rename src/{System => }/Game/H2048/Utils.hs (92%) diff --git a/h2048.cabal b/h2048.cabal index 70944c6..e4685a3 100644 --- a/h2048.cabal +++ b/h2048.cabal @@ -30,14 +30,14 @@ flag vty library hs-source-dirs: src - exposed-modules: System.Game.H2048.Core, - System.Game.H2048.Utils + exposed-modules: Game.H2048.Core, + Game.H2048.Utils if flag(exe) - exposed-modules: System.Game.H2048.UI.Simple + exposed-modules: Game.H2048.UI.Simple if flag(exe) && flag(vty) exposed-modules: - System.Game.H2048.UI.Vty + Game.H2048.UI.Vty build-depends: base >= 4 && < 5, transformers >= 0 && < 1, diff --git a/src/System/Game/H2048/Core.hs b/src/Game/H2048/Core.hs similarity index 98% rename from src/System/Game/H2048/Core.hs rename to src/Game/H2048/Core.hs index a01be17..1f0a60f 100644 --- a/src/System/Game/H2048/Core.hs +++ b/src/Game/H2048/Core.hs @@ -1,5 +1,5 @@ {-| - Module : System.Game.H2048.Core + Module : Game.H2048.Core Copyright : (c) 2014 Javran Cheng License : MIT Maintainer : Javran.C@gmail.com @@ -21,7 +21,7 @@ The routine for using this library would be: 4. examine if the player wins / loses / is still alive using `gameState`. -} -module System.Game.H2048.Core +module Game.H2048.Core ( Board , Line , Dir (..) @@ -44,7 +44,7 @@ import Control.Monad.Random import Data.List import Data.Maybe -import System.Game.H2048.Utils +import Game.H2048.Utils -- | represent a 4x4 board for Game 2048 -- each element should be either zero or 2^i diff --git a/src/System/Game/H2048/UI/Simple.hs b/src/Game/H2048/UI/Simple.hs similarity index 98% rename from src/System/Game/H2048/UI/Simple.hs rename to src/Game/H2048/UI/Simple.hs index 431920b..120f91f 100644 --- a/src/System/Game/H2048/UI/Simple.hs +++ b/src/Game/H2048/UI/Simple.hs @@ -1,5 +1,5 @@ {-| - Module : System.Game.H2048.UI.Simple + Module : Game.H2048.UI.Simple Copyright : (c) 2014 Javran Cheng License : MIT Maintainer : Javran.C@gmail.com @@ -9,14 +9,14 @@ A simple CLI implemention of Game 2048 -} -module System.Game.H2048.UI.Simple +module Game.H2048.UI.Simple ( drawBoard , playGame , mainSimple ) where -import System.Game.H2048.Core +import Game.H2048.Core import Data.List import Text.Printf diff --git a/src/System/Game/H2048/UI/Vty.hs b/src/Game/H2048/UI/Vty.hs similarity index 98% rename from src/System/Game/H2048/UI/Vty.hs rename to src/Game/H2048/UI/Vty.hs index 6a7925f..49eb091 100644 --- a/src/System/Game/H2048/UI/Vty.hs +++ b/src/Game/H2048/UI/Vty.hs @@ -1,5 +1,5 @@ {-| - Module : System.Game.H2048.UI.Vty + Module : Game.H2048.UI.Vty Copyright : (c) 2014 Javran Cheng License : MIT Maintainer : Javran.C@gmail.com @@ -10,7 +10,7 @@ A CLI version of Game 2048 implemented using vty-ui -} {-# LANGUAGE OverloadedStrings #-} -module System.Game.H2048.UI.Vty +module Game.H2048.UI.Vty ( PlayState (..) , mainVty ) @@ -25,7 +25,7 @@ import Data.Foldable (foldMap) import Data.IORef import Data.Maybe -import System.Game.H2048.Core +import Game.H2048.Core -- | indicate the status of a playing session data PlayState g = PlayState diff --git a/src/System/Game/H2048/Utils.hs b/src/Game/H2048/Utils.hs similarity index 92% rename from src/System/Game/H2048/Utils.hs rename to src/Game/H2048/Utils.hs index 356f849..c254349 100644 --- a/src/System/Game/H2048/Utils.hs +++ b/src/Game/H2048/Utils.hs @@ -1,5 +1,5 @@ {-| - Module : System.Game.H2048.Utils + Module : Game.H2048.Utils Copyright : (c) 2014 Javran Cheng License : MIT Maintainer : Javran.C@gmail.com @@ -9,7 +9,7 @@ helper functions used when implementing game logic -} -module System.Game.H2048.Utils +module Game.H2048.Utils ( inPos , universe ) diff --git a/src/MainSimple.hs b/src/MainSimple.hs index 26bd747..650e1be 100644 --- a/src/MainSimple.hs +++ b/src/MainSimple.hs @@ -1,7 +1,7 @@ module Main where -import System.Game.H2048.UI.Simple +import Game.H2048.UI.Simple main :: IO () main = mainSimple diff --git a/src/MainVty.hs b/src/MainVty.hs index e03160f..ebb60a6 100644 --- a/src/MainVty.hs +++ b/src/MainVty.hs @@ -1,7 +1,7 @@ module Main where -import System.Game.H2048.UI.Vty +import Game.H2048.UI.Vty main :: IO () main = mainVty diff --git a/src/Test.hs b/src/Test.hs index 6f52740..740310d 100644 --- a/src/Test.hs +++ b/src/Test.hs @@ -5,7 +5,7 @@ import Control.Monad import Control.Monad.Writer import System.Exit -import System.Game.H2048.Core +import Game.H2048.Core -- | the expected behavior of 'compactLine' compactLineTestcases :: [ ((Line, Int) , Line) ]