|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectipdlx.GameResult
public class GameResult
Results of the game how many points each player won
| Field Summary | |
|---|---|
protected int |
nrRounds
|
protected double[] |
payoffs
number of points won by players |
protected Player[] |
players
|
| Constructor Summary | |
|---|---|
GameResult(int nrRounds)
constructor |
|
GameResult(Player[] players,
int nrRounds)
constructor |
|
GameResult(java.util.Vector players,
int nrRounds)
constructor |
|
| Method Summary | |
|---|---|
void |
addPayoff(int index,
double payoff)
|
double[][] |
getLog()
returns game log (for both players) |
double |
getPayoffPlayer(int playerNb)
returns number of points won by selected player during this game |
double[] |
getPayoffs()
returns number of points won by each player during this game |
Player |
getPlayer(int index)
|
java.lang.String |
toString()
|
void |
writeMove(int nbOfRound,
int player,
double move)
write type of move made by players to game log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final double[] payoffs
protected final Player[] players
protected final int nrRounds
| Constructor Detail |
|---|
public GameResult(int nrRounds)
public GameResult(java.util.Vector players,
int nrRounds)
public GameResult(Player[] players,
int nrRounds)
| Method Detail |
|---|
public final Player getPlayer(int index)
public void addPayoff(int index,
double payoff)
public double[] getPayoffs()
public final double getPayoffPlayer(int playerNb)
playerNb - player A or B
public java.lang.String toString()
toString in class java.lang.Object
public void writeMove(int nbOfRound,
int player,
double move)
nbOfRound - -
which round is thisplayer - -
which player A or Bmove - -
type of move of player - COOPERATION or DEFECTIONpublic double[][] getLog()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||