de.uni_paderborn.robots.robot.group10
Class EnergyStrategy

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

public class EnergyStrategy
extends AbstractStrategy

one of the different strategy classes search for the shortest path to next well


Field Summary
private  int blockingRobot
          counts the rounds in which the robot waited for a blocking robot
private  boolean gettingEnergy
          attribute if able to get the energy
private  boolean moveCardAway
          attribute to decide to drop the card
private  boolean onWormholeEscape
          attribute to decide, whether we have to do a wormhole-escape
private  Map.ShortestPath shortestPath
          this field stores the shortestPath this strategy uses
 
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
EnergyStrategy(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

moveCardAway

private boolean moveCardAway
attribute to decide to drop the card

onWormholeEscape

private boolean onWormholeEscape
attribute to decide, whether we have to do a wormhole-escape

shortestPath

private Map.ShortestPath shortestPath
this field stores the shortestPath this strategy uses

blockingRobot

private int blockingRobot
counts the rounds in which the robot waited for a blocking robot

gettingEnergy

private boolean gettingEnergy
attribute if able to get the energy
Constructor Detail

EnergyStrategy

public EnergyStrategy(CardFinder robot)
constructor for this class
Parameters:
robot - a CardFinder
Method Detail

getCommand

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