|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectGameField.GameField
public class GameField
Class GameField Represents the gamefield
| Field Summary | |
|---|---|
static boolean |
DEBUG
|
protected Card[][] |
fieldCards
|
private GUI |
gui
|
protected boolean |
inGame
|
protected Network |
network
|
protected Cards |
packet
|
private int |
playerPosInPlayers
|
private java.lang.String |
playerPseudo
|
protected java.util.Vector<Player> |
players
|
| Constructor Summary | |
|---|---|
protected |
GameField(Card[][] fieldCards,
Cards packet,
java.util.Vector<Player> players,
Network network)
|
|
GameField(Network network)
|
| Method Summary | |
|---|---|
int[] |
addCardToField(Card c)
Adds the card c in an empty position |
void |
addCardToField(Card c,
int i,
int j)
Adds the card c at the position (i,j) on the gamefield |
void |
connect(java.lang.String host,
int port)
connecte le gameField au serveur ayant l'adresse host et le port port |
java.lang.String |
fieldCardToString()
|
Card[][] |
getFieldCards()
The logical gamefield |
GUI |
getGui()
|
boolean |
getInGame()
|
Network |
getNetwork()
Get the value of network |
Cards |
getPacket()
The 81 cards of the game |
int |
getPlayerPosInPlayers()
|
java.lang.String |
getPlayerPseudo()
|
java.util.Vector<Player> |
getPlayers()
Get the value of players |
java.lang.String |
playersToString()
|
void |
receiveData(int idConnection,
java.lang.String data)
traite la chaine data reçue par la connection idConnection |
void |
removeCardFromField(int i,
int j)
Remove the card at position (i,j) from the gamefield |
void |
setFieldCards(Card[][] value)
The logical gamefield |
void |
setGUI(GUI gui)
Set the value of gui |
void |
setNetwork(Network value)
Set the value of network |
void |
setPacket(Cards value)
The 81 cards of the game |
void |
setPlayerPosInPlayers(int i)
set the value of playerPosInPlayers |
void |
setPlayerPseudo(java.lang.String s)
Set the value of playerPseudo |
void |
setPlayers(java.util.Vector<Player> value)
Set the value of players |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean DEBUG
protected Card[][] fieldCards
private GUI gui
protected boolean inGame
protected Network network
protected Cards packet
private int playerPosInPlayers
private java.lang.String playerPseudo
protected java.util.Vector<Player> players
| Constructor Detail |
|---|
protected GameField(Card[][] fieldCards,
Cards packet,
java.util.Vector<Player> players,
Network network)
public GameField(Network network)
| Method Detail |
|---|
public int[] addCardToField(Card c)
throws GameFieldException
c -
GameFieldException
public void addCardToField(Card c,
int i,
int j)
throws GameFieldException
c - i - j -
GameFieldException
public void connect(java.lang.String host,
int port)
throws GameFieldException
host - port -
GameFieldExceptionpublic java.lang.String fieldCardToString()
public Card[][] getFieldCards()
public GUI getGui()
public boolean getInGame()
public Network getNetwork()
public Cards getPacket()
public int getPlayerPosInPlayers()
public java.lang.String getPlayerPseudo()
public java.util.Vector<Player> getPlayers()
public java.lang.String playersToString()
public void receiveData(int idConnection,
java.lang.String data)
idConnection - data -
public void removeCardFromField(int i,
int j)
i - j - public void setFieldCards(Card[][] value)
public void setGUI(GUI gui)
public void setNetwork(Network value)
public void setPacket(Cards value)
public void setPlayerPosInPlayers(int i)
public void setPlayerPseudo(java.lang.String s)
public void setPlayers(java.util.Vector<Player> value)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||