LicenseRef-GPL licensed and maintained by Henning Thielemann
This version can be pinned in stack with:board-games-0.4@sha256:aefdeb0f377d8db2e9cef38cb435ee0c01f462b9db01fea174e2ba12994438d7,4633

Three games that might run as CGI script in a web server: Connect Four, Rows&Columns, Mastermind. Additionally there is a CLI-only game: Das verrueckte Labyrinth.

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.

Changes

Change log for the board-games package

0.4

  • Labyrinth: New game “Das verrückte Labyrinth”.

0.3

  • Mastermind.CodeSet: Move from Set to EnumSet since this is three to ten times faster. It works best for alphabets with contiguous fromEnum-associated Ints, but even if not it should not be much worse than Set. If this is still too slow for you, you might consider mapping your alphabet to a contiguous set of Ints first. I tried to maintain both Set and EnumSet in one interface. It is possible even in Haskell 98 using explicit method dictionaries. However, it gets complicated and I am afraid that the speed advantage is diminished by the generalization overhead.

0.2.1

  • add criterion benchmarks for Mastermind

0.2

  • improved game strategy for Mastermind

0.1

  • hierarchical module names