jfreerails.controller
Class SimpleMoveExecutor
java.lang.Object
jfreerails.controller.SimpleMoveExecutor
- All Implemented Interfaces:
- MoveExecutor
public class SimpleMoveExecutor
- extends java.lang.Object
- implements MoveExecutor
A MoveExecutor that executes moves on the world object passed to its
constructor.
- Author:
- Luke
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
w
private final World w
p
private final FreerailsPrincipal p
SimpleMoveExecutor
public SimpleMoveExecutor(World world,
int playerID)
doMove
public MoveStatus doMove(Move m)
- Specified by:
doMove
in interface MoveExecutor
doPreMove
public MoveStatus doPreMove(PreMove pm)
- Specified by:
doPreMove
in interface MoveExecutor
tryDoMove
public MoveStatus tryDoMove(Move m)
- Specified by:
tryDoMove
in interface MoveExecutor
getWorld
public ReadOnlyWorld getWorld()
- Specified by:
getWorld
in interface MoveExecutor
getPrincipal
public FreerailsPrincipal getPrincipal()
- Specified by:
getPrincipal
in interface MoveExecutor