Solitaire in Ext JS
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Solitaire in ExtJS

Simple port of the windows Solitaire game for Ext JS.  Runs locally, no need for server except to serve the files.

* 35Kb of JavaScript, 15Kb minified.
* < 1300 lines including generous comments, JSDOC and whitespace
* Written for ExtJS 2.2.  Custom build at
* Roughly 25 hours work, mainly spent trying to find information about D&D in ExtJS.

To do:

* Save game state to cookie so as not to lose between refreshes
* Make 'New Game' functionality work properly (as in not refresh the whole window!)
* Make a 'cool' animation for the end
* Add a 'hint' option which flashes a card


* initialiseDragSource called after each render of each card, is probably leaking memory (see FIXME at conditional at beginning of that method)
* There seems to be an event firing leak when double clicking cards.  Before they are moved they fire the event several times.
* Currently using a hack in Card.getBestMatch as it will occasionally throw an error (winner.overlap is null).  Should be able to remove the try/catch block here
* Can't currently double-click a card in the Deck, only on top of a Stack


* Allowed double-click on a top card to stack to automatically put it onto appropriate suitstack if the move is permitted
* When moving a revealed card from a stack, any cards on top of it will also move
* Using a custom build of ExtJS as only a small part of the framework is used here
* Changed deck cycling direction (bottom card moved to top instead of top to bottom)
* Updated top menu with links to view source and download from Github
* Reorganised files, took all classes out of the Ext.ux namespace
* Added time taken and score to bottom status bar

* Updated DragDropMgr to use intersect instead of point
* When multiple cards are dragged they are now all shown in the drag proxy

* Finished styling UI components