de.uni_paderborn.robots.robot.group9
Class EnergyStrategy

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

public class EnergyStrategy
extends AbstractStrategy

One of the different strategy classes


Field Summary
private  int blockingRobot
          Counts the rounds in which the robot waited for a blocking robot.
(package private)  int card
          the card weight
private  Card cardToDrop
          The card to be dropped.
(package private)  int exit
          the exit weight
private  boolean gettingEnergy
          Attribute if able to get the energy.
private  Map map
          The map this strategy uses.
private  boolean moveCardAway
          Attrubute to decide to drop the card.
static java.lang.String NAME
           
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
EnergyStrategy(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
the card weight

exit

int exit
the exit weight

NAME

public static final java.lang.String NAME

moveCardAway

private boolean moveCardAway
Attrubute to decide to drop the card.

cardToDrop

private Card cardToDrop
The card to be dropped.

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.

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(LAR robot)
Parameters:
robot - a LAR
Method Detail

getCommand

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