Home

Awesome

solitaire

A basic Solitaire game, written in PureScript, including both a console and a web UI.

Module overview

Game logic

The following modules define basic data types for the game, and operations on them.

Console UI

The console UI uses node.js's readline module for a repl-ish interface. For printing things, it uses ANSI escape codes and unicode line-drawing characters to make the output recognisable as a Solitaire game.

The console UI code is contained in the following modules:

To play with the console UI, run

$ spago bundle-app --main Solitaire.Repl --to game.js && node game.js

Web UI

The web UI uses Halogen, and is contained in the following modules:

To play with the web UI, run

$ spago bundle-app --main Solitaire.Web --to web/app.js

and then open web/index.html in a browser window.