de.uni_paderborn.robots.robot.group9
Class MoveStrategy

java.lang.Object
  |
  +--de.uni_paderborn.robots.robot.group9.AbstractStrategy
        |
        +--de.uni_paderborn.robots.robot.group9.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
(package private)  int card
           
private  Card cardToDrop
          The card to be dropped.
private  boolean dropCardProcedure
          True, if the robot currently drops a card.
(package private)  int exit
           
private  Map map
          The map this strategy uses.
private  boolean moveCardAway
          Does the robot currently move a card out of its way?
static java.lang.String NAME
           
private  boolean onAlternativeCardPath
          Indicates if the robot is on an alternative card path.
private  LAR robot
          Attribute to access the LAR.
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.group9.AbstractStrategy
cardWeight, currentRobot, exitWeight, lar, name
 
Constructor Summary
MoveStrategy(LAR robot)
           
 
Method Summary
 AbstractAction getCommand()
          getCommand method
 
Methods inherited from class de.uni_paderborn.robots.robot.group9.AbstractStrategy
getCardWeight, getCurrentRobot, getExitWeight, getLar, getName, removeYou, setCardWeight, setCurrentRobot, setExitWeight, setLar, setName
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

card

int card

exit

int exit

NAME

public static final java.lang.String NAME

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

map

private Map map
The map this strategy uses. For easy access.

robot

private LAR robot
Attribute to access the LAR.

cardToDrop

private Card cardToDrop
The card to be dropped.

onAlternativeCardPath

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

dropCardProcedure

private boolean dropCardProcedure
True, if the robot currently drops a card.

moveCardAway

private boolean moveCardAway
Does the robot currently move a card out of its way?
Constructor Detail

MoveStrategy

public MoveStrategy(LAR robot)
Parameters:
robot -  
Method Detail

getCommand

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