zinger.nibbles.drivers
Class SynchronousSnakeDriverAdapter

java.lang.Object
  |
  +--zinger.nibbles.drivers.SnakeDriverAdapter
        |
        +--zinger.nibbles.drivers.SynchronousSnakeDriverAdapter
All Implemented Interfaces:
Constants, SnakeDriver
Direct Known Subclasses:
SimpleTargetSnakeDriver

public abstract class SynchronousSnakeDriverAdapter
extends SnakeDriverAdapter
implements Constants


Field Summary
protected  Field.GridMirror gridMirror
           
protected  Field.GridChange lastChange
           
 
Fields inherited from class zinger.nibbles.drivers.SnakeDriverAdapter
direction, directionQueue, offset, start
 
Fields inherited from interface zinger.nibbles.Constants
DIRECTIONS, DOWN, LEFT, LOAD_METHOD_NAME, LOAD_PARAMETER_TYPES, MAIN_PROPERTIES_FILE, RIGHT, SNAKE_LEVEL, TARGET_LEVEL, UP
 
Constructor Summary
protected SynchronousSnakeDriverAdapter()
           
protected SynchronousSnakeDriverAdapter(Field.GridMirror gridMirror)
           
 
Method Summary
protected  void basicEvasiveAction(Snake snake)
           
protected abstract  void timeCall(Snake snake)
           
protected abstract  void updateCell(int x, int y)
           
 int where(Snake snake)
          This method is called on every turn as initiated by Field.
 
Methods inherited from class zinger.nibbles.drivers.SnakeDriverAdapter
clear, enqueue
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

gridMirror

protected Field.GridMirror gridMirror

lastChange

protected Field.GridChange lastChange
Constructor Detail

SynchronousSnakeDriverAdapter

protected SynchronousSnakeDriverAdapter()

SynchronousSnakeDriverAdapter

protected SynchronousSnakeDriverAdapter(Field.GridMirror gridMirror)
Method Detail

updateCell

protected abstract void updateCell(int x,
                                   int y)

timeCall

protected abstract void timeCall(Snake snake)

where

public final int where(Snake snake)
Description copied from interface: SnakeDriver
This method is called on every turn as initiated by Field.
Overrides:
where in class SnakeDriverAdapter
Following copied from interface: zinger.nibbles.SnakeDriver
See Also:
Field.timeCall(zinger.nibbles.Timer)

basicEvasiveAction

protected void basicEvasiveAction(Snake snake)