Three games for inclusion in a web server
|Version on this page:||0.3|
|LTS Haskell 19.33:||0.3@rev:1|
|Stackage Nightly 2023-05-31:||0.4|
|Latest on Hackage:||0.4|
This version can be pinned in stack with:
Depends on 14 packages(full list with versions):
Used by 1 package in lts-14.27(full list with versions):
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
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.
Change log for the
Mastermind.CodeSet: Move from
EnumSetsince this is three to ten times faster. It works best for alphabets with contiguous
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
EnumSetin 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.
- add criterion benchmarks for
- improved game strategy for
- hierarchical module names