org.moyoman.module
Interface ModuleInterface
- All Superinterfaces:
- Cloneable, Serializable
- All Known Subinterfaces:
- BigPoint, Board, Connection, Dame, Endgame, Expert, Fuseki, Geometry, Groups, Joseki, Ladder, LifeAndDeath, LooseGroups, MiddleGame, MoveGenerator, Proverbs, Random, Safety, Shape, Tactics, Territory, Tesuji
- All Known Implementing Classes:
- BoardImpl, DameImpl, GeometryImpl, GroupsImpl, IgoFuseki, IgoProverbs, JosekiImpl, LadderImpl, LGImpl, Module, RandomImpl, SimpleBigPoint, SimpleEndgame, SimpleFuseki, SimpleMoveGenerator, SimpleSafety, SimpleShape, SimpleTactics, TacticsImpl
- public interface ModuleInterface
- extends Serializable, Cloneable
Both the Module abstract class and each module interface inherit this interface.
This interface defines methods that the user of any module might need.
By having both Module and all of the module interfaces implement or extend
this interface, that prevents the need for casting a Shape object to Module
to call methods such as getScheduler() or getMoves().
clone
public Object clone()
- Clone the module.
This method overrides the one in Object. Cloning modules is
an important requirement for the system to function correctly.
The derived class of Module must override this method. It may
be as straightforward as calling super.clone(). Consult any
Java textbook for more details. If you are not sure, ask
for help.
- Overrides:
clone
in class Object
- Returns:
- The cloned Module object.
getScheduler
public Scheduler getScheduler()
- Get a Scheduler object for this module.
The Scheduler object contains all objects
terminating with one that is the same type
as this object. This allows the module to
do search based processing.
- Returns:
- The Scheduler object.
getMoves
public RatedMove[] getMoves()
- Return the moves generated by the module.
Note that both good and bad moves can be returned.
- Returns:
- An array of RatedMove objects.