# Don't freak out about not having 'use strict' etc. # :) This is just psuedo code at places my $card = new Card([%attr]); $card->show([x,y]); # displays card on screen, optionally # with the upper-left coordinate # being (x,y) ->suit([val]); # returns (and optionally sets) the # suit to value (data type undecided) ->value([val]); # returns (and optionally sets) the # card number to value (1-13,A,K,Q,J) ->where([pile]); # returns (and optionally sets) the # pile where card is placed ->state([state]); # Sets card to be face up/face down ## "Friend" (from C++, loose usage) functions (designed for ## use with an array of cards (or maybe hash?) IsAlternatingColor(); # e.g., ...black,red,black,red... IsSameColor(); # e.g., ...black,black,black... IsAlternatingSuit(); # e.g., ...diamond,club,heart... IsSameSuit(); # e.g., ...spade,spade,spade... IsIncreasing(); # e.g., 2,3,4,5... IsDecreasing(); # e.g., K,Q,J,10... my $pile = new Pile([%attr]); $pile->maxcards([val]); # returns (and optionally # sets) max. amount of cards # (or NO_LIMIT constant) $pile->nextcard(); # returns suit/value of next # card, beginning at top $pile->get(x); # same thing, but xth card # (0 is top, 1 is second, ...) $pile->rules(rules); # Rules that cards must abide # by (e.g., decreasing) ## A tableau is a 2-d array of piles ## A waste/stock/foundation/etc. is a pile (or a collection ## thereof) ## Terms inspired by some of the free downloadable ## solitare programs, e.g., 1 2 3 Free Solitare ## at: www.123freesolitaire.com/ User-Level notes ---------------- Undo feature Change deck style Change different features of display Deign your own game Next Move AutoPlay (last two use a primitive AI algorithm; of course, I don't plan to do all these things at first, some are just ideas I 'may' choose to implement later -- its just a simple program for someone I know)