|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
jskat.data.SkatGameData
public class SkatGameData
A skat game
| Field Summary | |
|---|---|
(package private) static org.apache.log4j.Logger |
log
|
| Constructor Summary | |
|---|---|
SkatGameData()
Creates a new instance of a new game |
|
| Method Summary | |
|---|---|
void |
addToScore(int player,
int trickValue)
Adds the value of a trick to the score of a player |
void |
addTrick(int foreHand)
Adds a trick |
void |
calcRamschResult()
Calculates the result of a Ramsch game |
void |
calcResult()
|
void |
clearSkat()
Clears the skat |
void |
geschoben()
Raises the value of geschoben by 1 |
GameAnnouncement |
getAnnoucement()
Gets the game annoucement |
int |
getBidValue()
Returns the bid value of the game |
boolean |
getClubJack()
Returns TRUE if the player had the club jack |
int |
getDealer()
Gets the first forehand for the game |
java.util.Vector<CardVector> |
getDealtCards()
Gets the dealt cards |
boolean |
getDiamondJack()
Returns TRUE if the player had the diamond jack |
int |
getGameResult()
Returns the result of the game |
int |
getGameType()
Returns the type of the game |
int |
getGeschoben()
Gets the number of geschoben |
int |
getGeschobenMultiplier()
Gets the geschoben multiplier |
boolean |
getHeartJack()
Returns TRUE if the player had the heart jack |
int |
getOpponentScore()
|
boolean |
getOverBidded()
Returns TRUE if the player has overbidded |
CardVector |
getPlayerCards(int playerID)
|
JSkatPlayer[] |
getPlayers()
Gets the players of the game |
int |
getRamschAugen()
Gets the points of a ramsch game |
int |
getResult()
Gets the result of a game |
int |
getScore(int player)
Gets the score of a player |
int |
getSinglePlayer()
Returns the single player of the game |
int |
getSinglePlayerScore()
Gets the score of the single player |
CardVector |
getSkat()
Gets a reference to the skat for the game |
int |
getSkatOwner()
Returns the skat owner |
boolean |
getSpadeJack()
Returns TRUE if the player had the spade jack |
java.util.Vector<Trick> |
getTricks()
Gets all tricks |
int |
getTrickWinner(int trickNumber)
Gets the winner of the trick |
int |
getTrump()
Returns the type of the game |
boolean |
isBock()
Gets whether bock was announced or not |
boolean |
isContra()
Gets whether contra was announced or not |
boolean |
isDurchMarsch()
Gets whether a durchmarsch was done in a ramsch game or not |
boolean |
isGameLost()
Gets whether the game was lost or not |
boolean |
isHand()
Gets whether the single player has played a hand game or not |
boolean |
isJungFrau()
Gets whether someone was jungfrau in a ramsch game or not |
boolean |
isOuvert()
Gets whether the single player has played an ouvert game or not |
boolean |
isRe()
Gets whether re was announced or not |
boolean |
isSchneider()
Gets whether one party played schneider or not |
boolean |
isSchneiderAnnounced()
Gets whether schneider was announced or not |
boolean |
isSchwarz()
Gets whether schwarz was played or not |
boolean |
isSchwarzAnnounced()
Gets whether schwarz was announced or not |
void |
setAnnouncement(GameAnnouncement announcement)
Sets the game annoucement |
void |
setBidValue(int value)
Set the bid value of the game |
void |
setBock(boolean bock)
Sets whether bock was announced or not |
void |
setClubJack(boolean clubJack)
Set TRUE if the player had the club jack |
void |
setContra(boolean contra)
Sets whether contra was announced or not |
void |
setDealer(int firstForeHand)
Sets the first forehand for the game |
void |
setDealtCard(int playerID,
Card card)
Sets a dealt card |
void |
setDiamondJack(boolean diamondJack)
Set TRUE if the player had the diamond jack |
void |
setDurchMarsch(boolean durchMarsch)
Sets a durchmarsch was done in a ramsch game or not |
void |
setGameLost(boolean gameLost)
Sets whether the game was lost or not |
void |
setGameResult(int result)
Sets the result of the game manually (for overbidded games) |
void |
setGameType(int gameType)
Set the type of the game |
void |
setHand(boolean hand)
Set TRUE if the single player has played a hand game |
void |
setHeartJack(boolean heartJack)
Set TRUE if the player had the heart jack |
void |
setJungFrau(boolean jungFrau)
Sets whether someone was jungfrau in a ramsch game or not |
void |
setOuvert(boolean ouvert)
Sets whether the single player has played an ouvert game or not |
void |
setOverBidded(boolean overBidded)
Set TRUE if the player has overbidded |
void |
setPlayers(JSkatPlayer[] players)
Sets the players of the game |
void |
setRamschAugen(int ramschAugen)
Sets the points of a ramsch game |
void |
setRe(boolean re)
Sets whether re was announced or not |
void |
setSchneider(boolean schneider)
Sets whether one party played schneider or not |
void |
setSchneiderAnnounced(boolean schneiderAnnounced)
Sets whether schneider was announced or not |
void |
setSchwarz(boolean schwarz)
Sets whether schwarz was played or not |
void |
setSchwarzAnnounced(boolean schwarzAnnounced)
Sets whether schwarz was announced or not |
void |
setSinglePlayer(int singlePlayer)
Set the single player of the game |
void |
setSkatOwner(int skatOwner)
Sets the owner of the skat |
void |
setSpadeJack(boolean spadeJack)
Set TRUE if the player had the spade jack |
void |
setTrickCard(int trickNumber,
int cardNumber,
Card card)
Sets a trick card |
void |
setTrickWinner(int trickNumber,
int winner)
Sets the trick winner |
void |
setTrump(int trump)
Set the type of the game |
void |
updatePlayerCards(int playerID,
CardVector oldSkat)
|
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static org.apache.log4j.Logger log
| Constructor Detail |
|---|
public SkatGameData()
| Method Detail |
|---|
public int getGameResult()
public void setGameResult(int result)
public int getSinglePlayer()
public void setSinglePlayer(int singlePlayer)
public int getBidValue()
public void setBidValue(int value)
public int getGameType()
public void setGameType(int gameType)
public int getTrump()
public void setTrump(int trump)
public boolean isGameLost()
public void setGameLost(boolean gameLost)
gameLost - TRUE if the game was lostpublic boolean getOverBidded()
public void setOverBidded(boolean overBidded)
public boolean getClubJack()
public void setClubJack(boolean clubJack)
public boolean getSpadeJack()
public void setSpadeJack(boolean spadeJack)
public boolean getHeartJack()
public void setHeartJack(boolean heartJack)
public boolean getDiamondJack()
public void setDiamondJack(boolean diamondJack)
public boolean isHand()
public void setHand(boolean hand)
hand - TRUE if the single player has played a hand gamepublic boolean isOuvert()
public void setOuvert(boolean ouvert)
ouvert - TRUE if the single player has played an ouvert gamepublic boolean isSchneider()
public void setSchneider(boolean schneider)
schneider - TRUE if the single player or the opponents played schneiderpublic boolean isSchneiderAnnounced()
public void setSchneiderAnnounced(boolean schneiderAnnounced)
schneiderAnnounced - TRUE if Schneider was announcedpublic boolean isSchwarz()
public void setSchwarz(boolean schwarz)
schwarz - TRUE if the player or the opponents played schwarzpublic boolean isSchwarzAnnounced()
public void setSchwarzAnnounced(boolean schwarzAnnounced)
schwarzAnnounced - TRUE if schwarz was announcedpublic boolean isContra()
public void setContra(boolean contra)
contra - TRUE if contra was announcedpublic boolean isRe()
public void setRe(boolean re)
re - TRUE if re was announcedpublic boolean isBock()
public void setBock(boolean bock)
bock - TRUE if bock was announcedpublic int getRamschAugen()
public void setRamschAugen(int ramschAugen)
ramschAugen - The points of a ramsch game to be setpublic boolean isDurchMarsch()
public void setDurchMarsch(boolean durchMarsch)
durchMarsch - TRUE if someone did a durchmarsch in a ramsch gamepublic boolean isJungFrau()
public void setJungFrau(boolean jungFrau)
jungFrau - TRUE if someone was jungfrau in a ramsch game
public void addToScore(int player,
int trickValue)
player - The ID of the playertrickValue - The value of the trickpublic int getScore(int player)
player - The ID of a player
public int getSinglePlayerScore()
public int getOpponentScore()
public void calcResult()
public void calcRamschResult()
public int getResult()
public void addTrick(int foreHand)
foreHand - The player ID of the forehand in the trick
public void setTrickCard(int trickNumber,
int cardNumber,
Card card)
trickNumber - The number of the trick in a gamecardNumber - The number of the card in the trickcard - The ID of the card that was played
public void setTrickWinner(int trickNumber,
int winner)
trickNumber - The number of the trick in a gamewinner - The player ID of the winner of the trickpublic int getTrickWinner(int trickNumber)
trickNumber - The number of the trick in a game
public java.util.Vector<Trick> getTricks()
public int getGeschoben()
public int getGeschobenMultiplier()
public void geschoben()
public int getSkatOwner()
public void setSkatOwner(int skatOwner)
skatOwner - The player ID of the skat owner to be setpublic void setPlayers(JSkatPlayer[] players)
players - An array of the playerspublic JSkatPlayer[] getPlayers()
public CardVector getPlayerCards(int playerID)
public void updatePlayerCards(int playerID,
CardVector oldSkat)
public void setDealer(int firstForeHand)
firstForeHand - The player ID of the first forehandpublic int getDealer()
public CardVector getSkat()
public void clearSkat()
public java.util.Vector<CardVector> getDealtCards()
public void setDealtCard(int playerID,
Card card)
public void setAnnouncement(GameAnnouncement announcement)
announcement - The game annoucementpublic GameAnnouncement getAnnoucement()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||