0.0.3 • Published 1 year ago

impossible-solitaire v0.0.3

Weekly downloads
-
License
NOT LICENSED
Repository
github
Last release
1 year ago

Impossible Solitaire

Impossible Solitaire is a terminal based version of the classic card game (and Windows 3.x app). Made with Impossible.js.

npm.io

Installing

Open terminal and run npm install -g impossible-solitaire.

Playing

Just type solitaire.

This is a mouse based game.

Drag-and-Drop, Click and Double Click all work where appropriate.

Game options include choosing a scoring method (Standard, Vegas or None), the card draw mode (one card or three cards) and whether or not to keep cumulative score.

Game comes with 5 color themes. Log feature allows any move in the game to be undone.

Game board is always centered and is also responsive, so it can be played on anything from a classic 24x80 terminal window to a full screen MacBook one.

All data persist when app is terminated.

Upon winning, the cards will do their thing 😉.

App is meant to explore the limits of Impossible as an app framework and the Impossible Collection as a component library. Some implementation details and features may stray away from "the recommended best practices" just to prove a point. Totally worth it.

Developing

Clone the repo and cd into the repo directory.

Run npm install.

Setup

Start the development server: npm start.

This does the following:

  • It starts watching source files to generate two app versions: one for node and one for web.
  • It starts a dev server on port 8080.

The web version of the app is accessible via http://localhost:8080/www/.

The node version of the app is accessible via node dist.

An executable version of the app is in the bin directory.

Edit files in src directory to modify app.

Building

Build production bundles using npm run build.

This will generate three apps: 1. a production version of the web bundle accessible via http://localhost:8080/www/ 2. a production version of the node app accessible via node dist 3. an executable version of the app accessible via bin/{package-name}.js where name is the package name from package.json.

Publishing

To NPM

README-NPM.md (if exist) will be used as README file for NPM replacing the repo README. A stub is at this repo's root.

Only files in the bin directory will be published to the npm registry. dependencies and devDependencies will be removed from the published package.

Note: if publishing fails, run node scripts/postpack to revert.

To the Web

All required files are in the www directory. Can be used with static hosting services such as Netlify and GitHub pages.

Authors

(c) Ron Ilan

License

NOT LICENSED

Fabriqué au Canada : Made in Canada 🇨🇦