Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

cgsuite
Class ImpartialGameArray  view ImpartialGameArray download ImpartialGameArray.java

java.lang.Object
  extended bycgsuite.ImpartialGameArray

public abstract class ImpartialGameArray
extends java.lang.Object


Field Summary
private  int dimensions
           
private static boolean[] markers
           
private  int maxObservedValue
           
private  int size
           
private  int[] values
           
 
Constructor Summary
protected ImpartialGameArray(int dimensions)
           
 
Method Summary
private  void calculateNewValues(int oldSize)
           
 void calculateUpTo(int n)
           
 int getMaxObservedValue()
           
 int getNimValue(int n)
           
 int getNimValue(int x, int y)
           
 CanonicalGame getNimValueAsGame(int n)
           
 CanonicalGame getNimValueAsGame(int x, int y)
           
 int[] getNimValuesTo(int n)
           
 int getNumDimensions()
           
 int getNumValuesCalculated()
           
 java.lang.String getValueString(int n)
           
protected  void markOptions(int n, boolean[] markers, int[] previousValues)
           
protected  void markOptions(int x, int y, boolean[] markers)
           
private  int mex()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

markers

private static boolean[] markers

dimensions

private int dimensions

size

private int size

maxObservedValue

private int maxObservedValue

values

private int[] values
Constructor Detail

ImpartialGameArray

protected ImpartialGameArray(int dimensions)
Method Detail

markOptions

protected void markOptions(int n,
                           boolean[] markers,
                           int[] previousValues)

markOptions

protected void markOptions(int x,
                           int y,
                           boolean[] markers)

calculateUpTo

public void calculateUpTo(int n)

calculateNewValues

private void calculateNewValues(int oldSize)

getNumDimensions

public int getNumDimensions()

getNimValue

public int getNimValue(int n)

getNimValue

public int getNimValue(int x,
                       int y)

getNimValueAsGame

public CanonicalGame getNimValueAsGame(int n)

getNimValueAsGame

public CanonicalGame getNimValueAsGame(int x,
                                       int y)

getNimValuesTo

public int[] getNimValuesTo(int n)

mex

private int mex()

getMaxObservedValue

public int getMaxObservedValue()

getNumValuesCalculated

public int getNumValuesCalculated()

getValueString

public java.lang.String getValueString(int n)