Skip to content

An implementation of the game Love Letter in the terminal, written in Haskell.

License

Notifications You must be signed in to change notification settings

dixonary/hove-letter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hove-letter

An implementation of the brilliant game Love Letter, written in Haskell.

Installation

From Source

  1. Install Haskell Stack onto your system through the package manager or the Haskell Stack website.
  2. Grab the source code:
    git clone https://github.com/dixonary/hove-letter
  3. Enter the directory:
    cd hove-letter
  4. Build and run the code:
    stack build && stack exec love-letter

From Linux Release

  1. Make sure you have LibGMP installed, against which Haskell binaries are dynamically linked. Chances are good that you do.
  2. Download the binary from the Releases page here on GitHub.
  3. Run the binary directly:
    ./love-letter

Caveats

There are 3 steps to writing good Haskell code:

  1. Make it work.
  2. Make it simple.
  3. 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.

About

An implementation of the game Love Letter in the terminal, written in Haskell.

Resources

License

Stars

Watchers

Forks

Packages

No packages published