hove-letter
An implementation of the brilliant game Love Letter, written in Haskell.
Installation
From Source
- Install Haskell Stack onto your system through the package manager or the Haskell Stack website.
- Grab the source code:
git clone https://github.com/dixonary/hove-letter
- Enter the directory:
cd hove-letter
- Build and run the code:
stack build && stack exec love-letter
From Linux Release
- Make sure you have LibGMP installed, against which Haskell binaries are dynamically linked. Chances are good that you do.
- Download the binary from the Releases page here on GitHub.
- Run the binary directly:
./love-letter
Caveats
There are 3 steps to writing good Haskell code:
- Make it work.
- Make it simple.
- Make it readable.
The code here is very much stage-one code. There aren't a million comments and the actual implementation is fairly crap. There's a lot of low-hanging fruit for refactoring and general niceness improvements!
The AI is also exceptionally stupid, in that it will always play its held card (unless that is an illegal move). Making the AI better is left to the reader.