|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectrolec.Move
public class Move
This class represents a move within the game of FranksZoo. There are two types of moves (a) moves in which a Player plays a number of cards and (b) moves in which a player passes (no cards are played).
| Constructor Summary | |
|---|---|
Move(Player p)
Constructs a new pass Move; no cards are played |
|
Move(Player p,
NormalCard c,
SpecialCard s,
JokerCard j,
int n)
Constructs a new Move in which a number of cards is played. |
|
| Method Summary | |
|---|---|
boolean |
equals(Move move)
Returns whether the Move is exactly equal to another Move (i.e., the cards played in both Moves are exactly the same) |
NormalCard |
getCard()
Returns the NormalCard played in this move |
JokerCard |
getJokerCard()
Returns the JokerCard played in this move |
int |
getNumber()
Returns the number of NormalCards played in this move |
int |
getPlayer()
Returns the ID of the Player playing this move |
SpecialCard |
getSpecialCard()
Returns the SpecialCard played in this move |
int |
getTotal()
Returns the totalNumber of cards played during in this move |
boolean |
isChoice()
Returns whether this move was a choice or forced (only a pass can be forced) |
boolean |
isPass()
Returns whether this move was a pass |
java.lang.String |
toString()
Returns the String representation of this move |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Move(Player p)
p - the Player playing the move
public Move(Player p,
NormalCard c,
SpecialCard s,
JokerCard j,
int n)
p - the Player playing the movec - the NormalCard that is playeds - the SpecialCard that is played; if no SpecialCard is played, this parameter is nullj - the JokerCard that is player; if no JokerCard is played, this parameter is nulln - the number of NormalCards that is played| Method Detail |
|---|
public boolean isChoice()
public int getTotal()
public int getPlayer()
public int getNumber()
public NormalCard getCard()
public SpecialCard getSpecialCard()
public JokerCard getJokerCard()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean isPass()
public boolean equals(Move move)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||