org.eviline.ai
Class QueueContext

java.lang.Object
  extended by org.eviline.ai.Context
      extended by org.eviline.ai.QueueContext

public class QueueContext
extends Context

Context for a decision-tree whose list of shapes is already decided. A QueueContext is used instead for determining the optimal shape placements that a user will make.

Author:
robin

Field Summary
 QueueContext deeper
          The decided-on context, one level deeper
 ShapeType[] queue
          The queue of known upcoming shapes
 QueueContext shallower
          The parent of this context
 ShapeType type
          The current shape type in the shape queue
 
Fields inherited from class org.eviline.ai.Context
ai, decisionModifier, omit, original, paintedImpossible, remainingDepth
 
Constructor Summary
QueueContext(AIKernel ai, Field original, ShapeType[] queue)
          Create a QueueContext for determining the optimal placement of shapes (from a player's perspective) for the argument Field and ShapeType array.
 
Method Summary
 QueueContext deeper(Field deeperOriginal)
          Construct a Context that is a copy of this one, but for use at one level deeper in the decision tree.
 QueueContext deepest()
          Returns the "decided" context, the deepest of the children.
 QueueContext shallowest()
          Returns the "root" parent QueueContext.
 
Methods inherited from class org.eviline.ai.Context
toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

queue

public ShapeType[] queue
The queue of known upcoming shapes


deeper

public QueueContext deeper
The decided-on context, one level deeper


shallower

public QueueContext shallower
The parent of this context


type

public ShapeType type
The current shape type in the shape queue

Constructor Detail

QueueContext

public QueueContext(AIKernel ai,
                    Field original,
                    ShapeType[] queue)
Create a QueueContext for determining the optimal placement of shapes (from a player's perspective) for the argument Field and ShapeType array.

Parameters:
original -
queue -
Method Detail

deeper

public QueueContext deeper(Field deeperOriginal)
Description copied from class: Context
Construct a Context that is a copy of this one, but for use at one level deeper in the decision tree.

Overrides:
deeper in class Context
Returns:

shallowest

public QueueContext shallowest()
Returns the "root" parent QueueContext.

Returns:

deepest

public QueueContext deepest()
Returns the "decided" context, the deepest of the children.

Returns:


Copyright © 2013. All Rights Reserved.