packages feed

haskell-go-checkers (empty) → 0.1.0.0

raw patch · 5 files changed

+128/−0 lines, 5 filesdep +basedep +containersdep +glosssetup-changed

Dependencies added: base, containers, gloss

Files

+ LICENSE view
@@ -0,0 +1,21 @@+MIT License++Copyright (c) 2017 Prateek Kumar++Permission is hereby granted, free of charge, to any person obtaining a copy+of this software and associated documentation files (the "Software"), to deal+in the Software without restriction, including without limitation the rights+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell+copies of the Software, and to permit persons to whom the Software is+furnished to do so, subject to the following conditions:++The above copyright notice and this permission notice shall be included in all+copies or substantial portions of the Software.++THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE+SOFTWARE.
+ README.md view
@@ -0,0 +1,8 @@+# haskell-go-checkers+Go and checkers game in Haskell++1. Install haskell most recent.(>7.10)+2. Clone the repo+3. cabal update+4. cabal install+5. cabal run
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ haskell-go-checkers.cabal view
@@ -0,0 +1,76 @@+-- 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:         This is an implementation fo Go and Checkers game in haskell using GLOSS for GUI.+                     For more rules of Go visit https://www.britgo.org/intro/intro2.html.+                     For more rules of Checkers visit https://www.thespruce.com/play-checkers-using-standard-rules-409287.++-- URL for the project homepage or repository.+homepage:            https://github.com/prateekkumarweb/haskell-go-checkers++-- The license under which the package is released.+license:             MIT++-- 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:          prateek@prateekkumar.in++-- 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.9 && <4.10, 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++source-repository this+  type:                git+  location:            https://github.com/prateekkumarweb/haskell-go-checkers+  tag:                 v0.1.0.0
+ src/Main.hs view
@@ -0,0 +1,21 @@+{-|+    This module contains 'main' fuction.+-}+module Main(main) where++import Go+import Checkers++-- | The 'main' functions asks user whether to play 'Go' or 'Checkers' and calls 'playGo' and 'playCheckers' respectively.+main :: IO()+main = do+    putStrLn $ "Enter 1 to play Go"+    putStrLn $ "Enter 2 to play Checkers"+    putStrLn $ "Enter 0 to Exit"+    x <- getLine+    let i = read x+    if i == 1 then playGo else+        if i == 2 then playCheckers else+            if i == 0 then putStrLn ("Thank you") else do+            putStrLn $ "Invalid Input"+            main