de.uni_paderborn.robots.robotArenaInterface
Class PutAction

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

public final class PutAction
extends AbstractRobotAction

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


Field Summary
private  CardData card
          card to be put in front of robot.
 
Constructor Summary
PutAction(CardData card)
          constructor of PutAction.

How a Arena handles a bad PutAction
- 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 Summary
 CardData getCard()
          returns the card to be put.

How a Arena handles a bad PutAction
- 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.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

card

private CardData card
card to be put in front of robot.
Constructor Detail

PutAction

public PutAction(CardData card)
constructor of PutAction.

How a Arena handles a bad PutAction
- 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.
Parameters:
CardData - Card to be put to the field in front of the robot
Method Detail

getCard

public CardData getCard()
returns the card to be put.

How a Arena handles a bad PutAction
- 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.
Returns:
CardData containing the data of the card to be put