Skip to content

Latest commit

 

History

History
54 lines (48 loc) · 3.24 KB

README.md

File metadata and controls

54 lines (48 loc) · 3.24 KB

solitaire.hs

╭───────────── Solitaire ──────────────╮                                       
│╭──╮│╭──╮╭──╮╭──╮╭──╮╭──╮╭──╮╭──╮│╭  ╮│ Score:   0                            
││λ=││╭──╮╭──╮╭──╮╭──╮╭──╮╭──╮│7♠││                                           
│╰──╯│╭──╮╭──╮╭──╮╭──╮╭──╮│K♥│╰──╯│╰  ╯│ Moves:   0                            
│╭──╮│╭──╮╭──╮╭──╮╭──╮│J♣│╰──╯    │╭  ╮│                                       
││3♠││╭──╮╭──╮╭──╮│6♦│╰──╯             [New]                                 
│╭──╮│╭──╮╭──╮│9♣│╰──╯            │╰  ╯│                                       
││3♥││╭──╮│Q♠│╰──╯                │╭  ╮│ [Undo]                                
│╭──╮││4♠│╰──╯                                                               
││7♦││╰──╯                        │╰  ╯│                                       
│╰──╯│                            │╭  ╮│                                       
                                                                           
                                │╰  ╯│                                       
                                                                           
╰──────────────────────────────────────╯                                       

Essay

For more background on this project, read the blog post I wrote about developing it.

Prerequisites

You'll need to install:

  • haskell, a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing.
  • stack, a cross-platform program for developing Haskell projects.

Playing solitaire

You can clone this repo and use stack to build and run the executable like so:

git clone https://github.com/ambuc/solitaire.git
cd solitaire
stack build
stack exec solitaire-exe

Links

  • brick, a Haskell terminal user interface programming library.
    • guide.rst, the Brick User Guide
    • snake, a walkthrough of writing a snake game in Brick
  • microlens, a small extract of the larger Control.Lens library, which implements functional references.