Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
35 lines (28 sloc) 1.12 KB

shenzhen

Solves games of Shenzhen Solitaire, a minigame available standalone or as part of Shenzhen I/O from Zachtronics.

gameplay screenshot

Written for practice with Haskell and HaskellStack.

TODO

  • create Stack project
  • types for cards
  • create standard deck
  • Layout type
  • custom Show instances for Card, Layout
  • enter game Layout
  • shuffle deck to create Layout
  • Game type
  • Move type for card moves, collecting dragons
  • move :: Game -> Move -> Game
  • Automatic moves of available cards
  • Detect game win
  • Detect game loss
  • Generate list of possible Moves for a position
  • Filter possible Moves against Game history to avoid loops
  • Take moves until game win/loss

Cleanups:

  • Encode that Game has exactly one Foundation per Suit
  • Look at Bound or Enum for Rank