Skip to content

ambuc/solitaire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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.