-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
18 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | ||
|
@@ -9,7 +9,7 @@ | |
helper functions used when implementing game logic | ||
-} | ||
module System.Game.H2048.Utils | ||
module Game.H2048.Utils | ||
( inPos | ||
, universe | ||
) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters