de.uni_paderborn.robots.robot.group10
Class LazyRobot

java.lang.Object
  |
  +--de.uni_paderborn.robots.robot.group10.LazyRobot
All Implemented Interfaces:
RobotFunctions

public class LazyRobot
extends java.lang.Object
implements RobotFunctions

This robot is used for testing only.
A Robot that does nothing, but with a legal NoAction!


Field Summary
private  java.util.Random random
          random number generator
 
Constructor Summary
LazyRobot()
          constructor
 
Method Summary
 boolean exchangeOk(CardData myCard, CardData otherCard)
          always returns true
 CardData exchangeProposal(CardData[] cards)
          returns random card
 AbstractRobotAction getCommand(RobotData robotData)
          always returns NoAction
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

random

private java.util.Random random
random number generator
Constructor Detail

LazyRobot

public LazyRobot()
constructor
Method Detail

getCommand

public AbstractRobotAction getCommand(RobotData robotData)
always returns NoAction
Specified by:
getCommand in interface RobotFunctions
Following copied from interface: de.uni_paderborn.robots.robotArenaInterface.RobotFunctions
Parameters:
robotData - current status of the robot
Returns:
a subclass of AbstractRobotAction which contains the robot's next command

exchangeProposal

public CardData exchangeProposal(CardData[] cards)
returns random card
Specified by:
exchangeProposal in interface RobotFunctions
Following copied from interface: de.uni_paderborn.robots.robotArenaInterface.RobotFunctions
Parameters:
cards - set of cards the robot owns
Returns:
a card a robot is willing to change

exchangeOk

public boolean exchangeOk(CardData myCard,
                          CardData otherCard)
always returns true
Specified by:
exchangeOk in interface RobotFunctions
Following copied from interface: de.uni_paderborn.robots.robotArenaInterface.RobotFunctions
Parameters:
myCard - card the robot wants to give away
otherCard - card the robot wants to have
Returns:
true if the robot is willing to change