|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--de.uni_paderborn.robots.robot.group10.WrongFieldExchanger
This robot is used for testing only.
Modification of LessStupid robot, uses ExchangeActionAction also if Field in front contains no card
| Field Summary | |
private RobotData |
latestRobotData
stores latest robotData |
private int |
maxEnergy
memorizes maxEnergy |
private java.util.Random |
random
random number generator |
private int |
straightMoveCounter
counts series of moves over empty fields without interruption |
private int |
turnNo
turn counter |
private int |
wormwholeMoveCounter
counts moves through wormwholes |
| Constructor Summary | |
WrongFieldExchanger()
constructor |
|
| Method Summary | |
boolean |
exchangeOk(CardData myCard,
CardData otherCard)
Robot accepts cards exchange, if new cards would be better. |
CardData |
exchangeProposal(CardData[] cards)
Returns the card which absence costs fewest points, if the robot has any cards. |
AbstractRobotAction |
getCommand(RobotData robotData)
Returns next command. |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
private java.util.Random random
private int maxEnergy
private int turnNo
private int wormwholeMoveCounter
private int straightMoveCounter
private RobotData latestRobotData
| Constructor Detail |
public WrongFieldExchanger()
| Method Detail |
public AbstractRobotAction getCommand(RobotData robotData)
getCommand in interface RobotFunctionsde.uni_paderborn.robots.robotArenaInterface.RobotFunctionsrobotData - current status of the robotpublic CardData exchangeProposal(CardData[] cards)
exchangeProposal in interface RobotFunctionsde.uni_paderborn.robots.robotArenaInterface.RobotFunctionscards - set of cards the robot owns
public boolean exchangeOk(CardData myCard,
CardData otherCard)
exchangeOk in interface RobotFunctionsde.uni_paderborn.robots.robotArenaInterface.RobotFunctionsmyCard - card the robot wants to give awayotherCard - card the robot wants to have
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||