next up previous contents index
Next: relations Up: MemoSetCard Previous: methods   Contents   Index

Subsections

subclasses

overview

\includegraphics[]{MemoSetCardInherit.eps}


MemoSetEmptyCard

inherits from: MemoSetCard and is a template for empty card slots. Therefore it isn't a GameCardClass, too.

slots

This class owns only inherited slots.

class methods

numberOfCardsNeededForSet(constants)
An empty card does not need any other cards for a set: Therefore return always: 0.
createSetWithAllCards(instance creation)
Return a set with exactly one empty card.

instance methods

clickedByUser: aUser (accessing)
just do nothing. An empty card can not be selected.
scoreForSet: aSet (accessing)
an empty card scores 0.
defaultViewClass(default)
returns the MemoSetEmptyCardView class.
isASet: aList (testing)
An empty card is never a set. Therefore return always: false.


MemoSetSetCard

inherits from: MemoSetCard and implements the original Set cards.

slots:

This class owns additional slots which characterize the cards.
color
(type: singleValue) - the color of the card's symbols (red, green or blue)
filling
(type: singleValue) - the filling of the card's symbols (empty, half or full)
form
(type: singleValue) - the form of the card's symbols (ellipse, rectangle ot triangle)
number
(type: singleValue) - the number of the card's symbol (one, two or three)

class methods

numberOfCardsNeededForSet (constants)
A card of this set does need two other cards for a set: Therefore return always: 3.
isGameCardClass (constants)
we are a real GameCardClass therefore return true.
createSetWithAllCards (instance creation)
Create a set of all possible cards. Let's see: We have four properties and each has three possible values. That's a total of $3^4$=72 cards.
colors (private)
returns a Set with all possible ColorValues of the elements on the cards.
fillings (private)
returns a Set with all possible fillings (asString) of the elements on the cards.
forms (private)
returns a Set with all possible forms (asString) of the elements on the cards.
numbers (private)
returns a Set with all possible numbers of the elements on the cards.
color: aColor filling: aFilling form: aForm number: aNumber (private instance creation)
creates a card with the given properties.

instance methods

color
is a simple access method to the color slot.
filling
is a simple access method to the filling slot.
form
is a simple access method to the form slot.
number
is a simple access method to the number slot.
scoreForSet: aSet
returns the score for a Set. Each difference of a property counts as one point. You can find more information at the games help file.
defaultViewClass (default)
returns the MemoSetSetCardView class.
isASet: aList (testing)
We need to test for each property if it is the same or different at all three cards. Only if this is true for all four properties the cards are a set and we return true.
propertiesAreEqualOrAllDifferentTo: first and: second and: third (private testing)
is getting three properties and returns if they are alle the same or all different.


MemoSetMemoSetCard

inherits from: MemoSetSetCard and implements the "Memory Set" cards.

slots

This class owns only inherited slots.

instance methods

defaultViewClass (default)
returns the MemoSetMemoSetCardView class.
next up previous contents index
Next: relations Up: MemoSetCard Previous: methods   Contents   Index
spax 2003-04-28