de.uni_paderborn.robots.robotArenaInterface
Class ExchangeAction

java.lang.Object
  |
  +--de.uni_paderborn.robots.robotArenaInterface.AbstractRobotAction
        |
        +--de.uni_paderborn.robots.robotArenaInterface.ExchangeAction

public final class ExchangeAction
extends AbstractRobotAction

This class describes a ExchangeAction. ExchangeAction is a possible return value of the "getCommand" method. This Action should be returned by "getCommand" if a robot wants to exchange a card from it's hand with the card on the field in front of it. The energy of the robot will decrease.


Constructor Summary
ExchangeAction(CardData card)
          constructor of ExchangeAction.
 
Method Summary
 CardData getCard()
          returns the card to be put.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExchangeAction

public ExchangeAction(CardData card)
constructor of ExchangeAction. How a Arena handles a bad ExchangeAction - If getCard() returns null the robot loses energy but does nothing. - If getCard() returns a card but the robot does not own it the robot is disqualified by the arena.
Method Detail

getCard

public CardData getCard()
returns the card to be put. How a Arena handles a bad ExchangeAction - If getCard() returns null the robot loses energy but does nothing. - If getCard() returns a card but the robot does not own it the robot is disqualified by the arena.