de.uni_paderborn.robots.robot.group10
Class MoveStrategy

java.lang.Object
  |
  +--de.uni_paderborn.robots.robot.group10.AbstractStrategy
        |
        +--de.uni_paderborn.robots.robot.group10.MoveStrategy

public class MoveStrategy
extends AbstractStrategy

one of the different abstract Strategies, the robot looks for the nearest unknown field


Field Summary
private  int blockingRobot
          Counts how many rounds this robot did NopActions because another robot was in the way
private  boolean onAlternativeCardPath
          Indicates if the robot is on an alternative card path.
private  Map.ShortestPath shortestPath
          This field stores the shortestPath this strategy uses between the game rounds
 
Fields inherited from class de.uni_paderborn.robots.robot.group10.AbstractStrategy
cardDroppedDirection, currentRobot, EXCHANGED_CARD, IDLE, lastAction, map, MOVED_AWAY, PICKED_CARD, PICKED_OLD_CARD_AGAIN, pickedCard, random, TURNED_BACK_TO_OLD
 
Constructor Summary
MoveStrategy(CardFinder robot)
          constructor for this class
 
Method Summary
 AbstractRobotAction getCommand()
          getCommand method
 
Methods inherited from class de.uni_paderborn.robots.robot.group10.AbstractStrategy
dropCard, findFreeField, getCurrentRobot, getMap, setCurrentRobot, setMap
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

blockingRobot

private int blockingRobot
Counts how many rounds this robot did NopActions because another robot was in the way

shortestPath

private Map.ShortestPath shortestPath
This field stores the shortestPath this strategy uses between the game rounds

onAlternativeCardPath

private boolean onAlternativeCardPath
Indicates if the robot is on an alternative card path.
Constructor Detail

MoveStrategy

public MoveStrategy(CardFinder robot)
constructor for this class
Parameters:
robot - a reference to the current robot
Method Detail

getCommand

public AbstractRobotAction getCommand()
getCommand method
Overrides:
getCommand in class AbstractStrategy
Returns:
abstractAction the action to be performed