Skip to content

Commit

Permalink
System.Game -> Game
Browse files Browse the repository at this point in the history
  • Loading branch information
Javran committed Oct 15, 2014
1 parent 8489768 commit 1af793b
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions h2048.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/System/Game/H2048/Core.hs → src/Game/H2048/Core.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-|
Module : System.Game.H2048.Core
Module : Game.H2048.Core
Copyright : (c) 2014 Javran Cheng
License : MIT
Maintainer : [email protected]
Expand All @@ -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 (..)
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-|
Module : System.Game.H2048.UI.Simple
Module : Game.H2048.UI.Simple
Copyright : (c) 2014 Javran Cheng
License : MIT
Maintainer : [email protected]
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/System/Game/H2048/UI/Vty.hs → src/Game/H2048/UI/Vty.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-|
Module : System.Game.H2048.UI.Vty
Module : Game.H2048.UI.Vty
Copyright : (c) 2014 Javran Cheng
License : MIT
Maintainer : [email protected]
Expand All @@ -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
)
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/System/Game/H2048/Utils.hs → src/Game/H2048/Utils.hs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{-|
Module : System.Game.H2048.Utils
Module : Game.H2048.Utils
Copyright : (c) 2014 Javran Cheng
License : MIT
Maintainer : [email protected]
Expand All @@ -9,7 +9,7 @@
helper functions used when implementing game logic
-}
module System.Game.H2048.Utils
module Game.H2048.Utils
( inPos
, universe
)
Expand Down
2 changes: 1 addition & 1 deletion src/MainSimple.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Main
where

import System.Game.H2048.UI.Simple
import Game.H2048.UI.Simple

main :: IO ()
main = mainSimple
2 changes: 1 addition & 1 deletion src/MainVty.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module Main
where

import System.Game.H2048.UI.Vty
import Game.H2048.UI.Vty

main :: IO ()
main = mainVty
2 changes: 1 addition & 1 deletion src/Test.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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) ]
Expand Down

0 comments on commit 1af793b

Please sign in to comment.