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

Subsections

methods

class


constants

numberOfCardsNeededForSet
This method should return an Integer value how many cards are needed for a complete set. Due to the reason MemoSetCard is an abstract class, it is the subclasses' responsibility to implement this method.
isGameCardClass
should return true if the class is a "real" card class

instance creation

createSetWithAllCards
This is not a normal implementation of instance creation, because you do not need only one card and you don't know which cards really exist outside. So here the method returns all possible cards in a set.Due to the reason MemoSetCard is an abstract class, it is the subclasses' responsibility to implement this method.

instance

accessing

clickedByUser
select or deselect the card and test if the user has marked a set. Do some simple verification.
container
a simple acces method to the container slot
container: aGameOrUser
a simple acces method to the container slot
delesectByAllUsers
deselects the card by all users
numberOfCardsNeededForSet
just an interface to ask the class
scoreForSet: aSet
should return the score for a given set. Due to the reason MemoSetCard is an abstract class, it is the subclasses' responsibility to implement this method.
selectedBy
returns a Collection with the users which currently selected this card

default

defaultViewClass
return the view class for this kind of card. Due to the reason MemoSetCard is an abstract class, it is the subclasses' responsibility to implement this method.

testing

isASet: aList
The method gets a list with self class numberOfCardsNeededForSet (see 2.1.1) elements and decide if it is a valid set. Due to the reason MemoSetCard is an abstract class, it is the subclasses' responsibility to implement this method.
isSelected
returns true if self selectedBy is empty (see 2.1.2).

private accessing

deselectByUser: aUser
deselects the card for a given MemoSetUser.
selectByUser: aUser
selects the card for a given MemoSetUser.
next up previous contents index
Next: subclasses Up: MemoSetCard Previous: MemoSetCard   Contents   Index
spax 2003-04-28