ipdlx
Class GameMatrix
java.lang.Object
ipdlx.GameMatrix
public class GameMatrix
- extends java.lang.Object
- Author:
- Jan Humble
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
payoffMatrix
protected double[][] payoffMatrix
defaultPayoffMatrix5x5
public static final double[][] defaultPayoffMatrix5x5
defaultPayoffMatrix2x2
public static final double[][] defaultPayoffMatrix2x2
nrRows
protected int nrRows
nrColumns
protected int nrColumns
GameMatrix
public GameMatrix()
throws WrongGameMatrixValuesException
- Throws:
WrongGameMatrixValuesException
GameMatrix
public GameMatrix(double[][] payoffMatrix)
throws WrongGameMatrixValuesException
- Throws:
WrongGameMatrixValuesException
checkValues
public boolean checkValues(double[][] payoffMatrix)
setPayoffMatrix
public void setPayoffMatrix(double[][] payoffMatrix)
throws WrongGameMatrixValuesException
- Throws:
WrongGameMatrixValuesException
getPayoffIndex
protected int[] getPayoffIndex(double moveA,
double moveB)
getPayoff
public double getPayoff(double moveA,
double moveB,
int player)
getPayoff
public double[] getPayoff(double moveA,
double moveB)
getPayoffMatrix
public double[][] getPayoffMatrix()
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
main
public static void main(java.lang.String[] args)