de.tabacha.cgo
Interface Engine

All Known Implementing Classes:
AbstractEngine

public interface Engine

Implementing classes think about positions and try to find the best moves. "This is where the intelligence is located."
$Id: Engine.java,v 1.6 2004/07/30 21:05:58 mk Exp $

Version:
$Revision: 1.6 $

Method Summary
 boolean canPlayBothSides()
          Returns true if routine can play in direction UP and DOWN.
 java.lang.String getAuthor()
          Returns the name of the author.
 java.lang.String getDescription()
          Returns a longer text about this routine.
 java.lang.String getName()
          Returns the general (human-readable) name of the routine.
 java.lang.String getVersion()
          Returns an internal identification string in addition to the official name.
 void initGame(long randSeed)
          Starts a new game.
 Move think(Board position)
          Routine thinks here.
 

Method Detail

getName

public java.lang.String getName()
Returns the general (human-readable) name of the routine. Must not return null.


getVersion

public java.lang.String getVersion()
Returns an internal identification string in addition to the official name. Must not return null.


getDescription

public java.lang.String getDescription()
Returns a longer text about this routine. Just write a few lines of general information.


getAuthor

public java.lang.String getAuthor()
Returns the name of the author. Should be the same as in the author tag in the documentation comment for your class, maybe with an eMail address.


canPlayBothSides

public boolean canPlayBothSides()
Returns true if routine can play in direction UP and DOWN. Returns false if routine can only play in direction UP.
Most routines will return false here; it is easier to implement a strategy that always play in the same direction. But some routines may want to use different strategies for different playing directions. And for the human players, this option is necessary.


initGame

public void initGame(long randSeed)
Starts a new game. For initialization.

Parameters:
randSeed - For initializing a random number generator. Makes it possible to repeat a game entirely; useful for testing.

think

public Move think(Board position)
Routine thinks here.

Parameters:
position - The actual position
Returns:
The move the routine makes