|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||
java.lang.Objectjava.lang.Enum<Place>
net.curre.prefcount.gui.type.Place
public enum Place
This enum represents player's place.
Created date: May 28, 2008
| Enum Constant Summary | |
|---|---|
EAST
East side player. |
|
NORTH
North side player. |
|
SOUTH
South side player. |
|
WEST
West side player. |
|
| Field Summary | |
|---|---|
static Place[] |
FOUR_PLAYERS
Four player game places. |
int |
index
Index of this place relative to other places. |
java.lang.String |
longKey
Place's long string resource key. |
java.lang.String |
shortKey
Place's short string resource key. |
static Place[] |
THREE_PLAYERS
Three player game places. |
| Method Summary | |
|---|---|
static Place[] |
getOtherPlayersWhistPlaces(Place place,
int numPlayers)
Gets all whist places that the given player. |
static Place |
getPlaceForIndex(int index)
Fetches a place for the given index. |
static Place[] |
getPlaces(int playerNum)
Given number of player, returns array of places for this game. |
static Place |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static Place[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
| Methods inherited from class java.lang.Enum |
|---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Enum Constant Detail |
|---|
public static final Place EAST
public static final Place SOUTH
public static final Place WEST
public static final Place NORTH
| Field Detail |
|---|
public final java.lang.String shortKey
public final java.lang.String longKey
public final int index
public static final Place[] THREE_PLAYERS
public static final Place[] FOUR_PLAYERS
| Method Detail |
|---|
public static final Place[] values()
for(Place c : Place.values())
System.out.println(c);
public static Place valueOf(java.lang.String name)
name - the name of the enum constant to be returned.
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified namepublic static Place[] getPlaces(int playerNum)
playerNum - number of player in the game.
public static Place getPlaceForIndex(int index)
index - place's index.
public static Place[] getOtherPlayersWhistPlaces(Place place,
int numPlayers)
place - player's place.numPlayers - total number of player in the game.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD | |||||||||