Name:             board-games
Version:          0.3
License:          GPL
License-File:     LICENSE
Author:           Henning Thielemann <haskell@henning-thielemann.de>
Maintainer:       Henning Thielemann <haskell@henning-thielemann.de>
Homepage:         http://code.haskell.org/~thielema/games/
Category:         Game, Web
Synopsis:         Three games for inclusion in a web server
Description:
  Three games that might run as CGI script in a web server:
  Connect Four, Rows&Columns, Mastermind
  .
  Check running versions at
  <http://www.henning-thielemann.de/VierGewinnt> and
  <http://www.henning-thielemann.de/ZeilenSpalten>.
  .
  You can build an example web server by installing with
  .
  > cabal install board-games -fbuildExamples
  .
  Then start the server with
  .
  > ./dist/build/board-games/board-games
  .
  and play the games in your browser at the URL
  <http://localhost:8080/>.
  .
  Currently the games use German texts.
  I wanted to use gettext, but this is not thread-safe.
Tested-With:       GHC==6.4.1, GHC==6.8.2, GHC==6.12.3
Cabal-Version:     1.14
Build-Type:        Simple
Extra-Source-Files:
  Makefile
  Changes.md

Source-Repository head
  type:     darcs
  location: http://code.haskell.org/~thielema/games/

Source-Repository this
  tag:      0.3
  type:     darcs
  location: http://code.haskell.org/~thielema/games/

Flag buildExamples
  description: build example web server that runs the games

Flag splitBase
  description: Choose the new smaller, split-up base package.

Library
  Build-Depends:
    html >=1.0 && <1.1,
    cgi >=3001.1 && <3002,
    non-empty >=0.2 && <0.4,
    utility-ht >=0.0.3 && <0.1,
    transformers >=0.2.2 && <0.6,
    enummapset >=0.1 && <0.7,
    QuickCheck >2.0 && <3.0
  If flag(splitBase)
    Build-Depends:
      containers >=0.2 && <0.7,
      random >=1.0 && <1.2,
      array >=0.1 && <0.6,
      base >= 2 && <5
  Else
    Build-Depends: base >= 1.0 && < 2

  Default-Language: Haskell2010
  GHC-Options:      -Wall
  Hs-Source-Dirs:   src, private
  Exposed-Modules:
    Game.Tree
    Game.VierGewinnt.HTML
    Game.VierGewinnt.Text
    Game.VierGewinnt
    Game.ZeilenSpalten.HTML
    Game.ZeilenSpalten
    Game.Mastermind.HTML
    Game.Mastermind
    Game.Mastermind.CodeSet
    Game.Mastermind.CodeSet.Union
    Game.Mastermind.CodeSet.Tree
    Game.Mastermind.NonEmptyEnumSet
  Other-Modules:
    Game.Utility

Executable board-games
  Default-Language: Haskell2010
  GHC-Options:      -Wall
  Hs-Source-Dirs:   demo
  Main-Is:          Server.hs
  Other-Modules:    Server.Option
  If flag(buildExamples)
    Build-Depends:
      board-games,
      httpd-shed >=0.4 && <0.5,
      network-uri >=2.6 && <2.7,
      html,
      cgi,
      non-empty,
      utility-ht,
      transformers,
      containers,
      random,
      array,
      base
  Else
    Buildable: False

Test-Suite board-games-test
  Type:             exitcode-stdio-1.0
  Default-Language: Haskell2010
  GHC-Options:      -Wall
  Hs-Source-Dirs:   test, private
  Main-Is:          Test.hs
  Other-Modules:
    Test.Mastermind
    Game.Utility
  Build-Depends:
    board-games,
    QuickCheck,
    non-empty >=0.3.1,
    utility-ht,
    transformers,
    enummapset,
    containers,
    random,
    array,
    base

Benchmark mastermind-strategy
  Type:             exitcode-stdio-1.0
  Default-Language: Haskell2010
  GHC-Options:      -Wall -fwarn-missing-import-lists -threaded -rtsopts
  Hs-Source-Dirs:   benchmark, private
  Main-Is:          MastermindStrategy.hs
  Other-Modules:
    Game.Utility
  Build-Depends:
    board-games,
    QuickCheck,
    parallel >=3.2.1 && <3.3,
    transformers,
    enummapset,
    containers,
    random,
    non-empty,
    utility-ht,
    base

Benchmark mastermind-benchmark
  Type:             exitcode-stdio-1.0
  Default-Language: Haskell2010
  GHC-Options:      -Wall -fwarn-missing-import-lists -threaded
  Hs-Source-Dirs:   benchmark
  Main-Is:          MastermindSpeed.hs
  Build-Depends:
    board-games,
    criterion >=0.6 && <1.6,
    enummapset,
    containers,
    non-empty,
    utility-ht,
    base