JTF > Demo Gallery > assignments > Solitaire

 
This assignment allows students to create a whole family of solitaire games using inheritance to share those aspects of the implementation that are common to all the games. The first example on this page implements the solitaire game, which is probably the most familiar form. The applets at the end of this page implement three other variants, all of which involve significant levels of strategy.

The Klondike assignment was introduced at Stanford by Todd Feldman in the early 1990s and subsequently converted to an object-oriented solitatire collection by Eric Roberts. Robert Noonan discussed the idea of using solitaire to illustrate object-oriented design in the 2007 entries in the “Nifty Assignments” collection (http://nifty.stanford.edu/).


FreeCell


Sixteen


BigTen