Skip to content
This repository has been archived by the owner on Jun 1, 2019. It is now read-only.

Commit

Permalink
Add cabal config files
Browse files Browse the repository at this point in the history
Signed-off-by: Prateek Kumar <[email protected]>
  • Loading branch information
prateekkumarweb committed Apr 12, 2017
1 parent d8bf1f4 commit 101c3a6
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ cabal.sandbox.config
*.eventlog
.stack-work/
cabal.project.local

Main
2 changes: 2 additions & 0 deletions Setup.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import Distribution.Simple
main = defaultMain
69 changes: 69 additions & 0 deletions haskell-go-checkers.cabal
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
-- Initial haskell-go-checkers.cabal generated by cabal init. For further
-- documentation, see http://haskell.org/cabal/users-guide/

-- The name of the package.
name: haskell-go-checkers

-- The package version. See the Haskell package versioning policy (PVP)
-- for standards guiding when and how versions should be incremented.
-- http://www.haskell.org/haskellwiki/Package_versioning_policy
-- PVP summary: +-+------- breaking API changes
-- | | +----- non-breaking API additions
-- | | | +--- code changes with no API change
version: 0.1.0.0

-- A short (one-line) description of the package.
synopsis: Go and Checkers game in Haskell

-- A longer description of the package.
-- description:

-- URL for the project homepage or repository.
homepage: https://github.com/prateekkumarweb/haskell-go-checkers

-- The license under which the package is released.
-- license:

-- The file containing the license text.
-- license-file: LICENSE

-- The package author(s).
author: Prateek Kumar, Vaibhav Sinha, Anurag Singh

-- An email address to which users can send suggestions, bug reports, and
-- patches.
maintainer: [email protected]

-- A copyright notice.
-- copyright:

category: Game

build-type: Simple

-- Extra files to be distributed with the package, such as examples or a
-- README.
extra-source-files: README.md

-- Constraint on the version of Cabal needed to build this package.
cabal-version: >=1.10


executable haskell-go-checkers
-- .hs or .lhs file containing the Main module.
main-is: Main.hs

-- Modules included in this executable, other than Main.
-- other-modules:

-- LANGUAGE extensions used by modules in this package.
-- other-extensions:

-- Other library packages from which modules are imported.
build-depends: base >=4.8 && <4.9, containers >=0.5 && <0.6, gloss ==1.11.*

-- Directories containing source files.
hs-source-dirs: src

-- Base language which the package is written in.
default-language: Haskell2010
File renamed without changes.
2 changes: 1 addition & 1 deletion BoardGo.hs → src/BoardGo.hs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ findTerritory game@(Game _ _ boardSize _ _) point@(Point x y) stone (m, points)

findTerritories :: Game -> Point -> (Map Point Status) -> (Map Point Status)
findTerritories game point m
| seekBoard game point /= Empty = addPiece m point None
| seekBoard game point /= Empty && seekBoard game point /= Ko = addPiece m point None
| seekMap m point == SeenW = m
| seekMap m point == SeenB = m
| seekMap m point == None = m
Expand Down
File renamed without changes.
File renamed without changes.
5 changes: 5 additions & 0 deletions Main.hs → src/Main.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
module Main(main) where

import Go
import Checkers
import Graphics.Gloss

main :: IO()
main = do
display (InWindow "Nice Window" (200, 200) (10, 10)) white (Circle 80)
putStrLn $ "Enter 1 to play Go"
putStrLn $ "Enter 2 to play Checkers"
putStrLn $ "Enter 0 to Exit"
Expand Down

0 comments on commit 101c3a6

Please sign in to comment.