|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectMonopoly.Cell
Monopoly.PickCard
public class PickCard
This class represents the cell which makes the player to pick a card.
Implementation Invariant: Once created and until destroyed instances of
PickCard subclasses will have an identifier color.
They will represent a pickCard Cell of the Monopoly game.
| Constructor Summary | |
|---|---|
PickCard(java.lang.String name,
int location,
int color)
Constructs a new "Pick card" cell. |
|
| Method Summary | |
|---|---|
void |
act(Monopoly game)
Makes the player to pick a card from the collection of the cards. |
int |
getColor()
Get the color of the card (Accessor). |
| Methods inherited from class Monopoly.Cell |
|---|
getLocation, getName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PickCard(java.lang.String name,
int location,
int color)
| Method Detail |
|---|
public int getColor()
public void act(Monopoly game)
throws java.lang.NullPointerException
act in interface Interactiveact in class Cellgame - the Monopoly instance that represents the game.
java.lang.NullPointerException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||