de.uni_paderborn.robots.items
Class Teleport

java.lang.Object
  |
  +--de.uni_paderborn.robots.items.Item
        |
        +--de.uni_paderborn.robots.items.Reactable
              |
              +--de.uni_paderborn.robots.items.Teleport

public class Teleport
extends Reactable

This is the reactable item Teleport


Field Summary
private static java.util.Random rand
          needed to place robots randomly
private  Teleport teleport
          the Teleporter. caution: there can only be one link to another teleporter and the same round.
 
Fields inherited from class de.uni_paderborn.robots.items.Reactable
energyDiff
 
Fields inherited from class de.uni_paderborn.robots.items.Item
field, name
 
Constructor Summary
Teleport()
           
 
Method Summary
 void doAction(Robot robot)
          teleporter doAction robots are put randomly like this onto free fields:
?
 Teleport getTeleport()
          get method for the teleport-partner
 void setTeleport(Teleport elem)
          sets the Teleporter or if already set its partner
 
Methods inherited from class de.uni_paderborn.robots.items.Reactable
getEnergyDiff, setEnergyDiff
 
Methods inherited from class de.uni_paderborn.robots.items.Item
getField, getIcon, getName, removeYou, setField, setName
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

rand

private static java.util.Random rand
needed to place robots randomly

teleport

private Teleport teleport
the Teleporter. caution: there can only be one link to another teleporter and the same round.
Constructor Detail

Teleport

public Teleport()
Method Detail

doAction

public void doAction(Robot robot)
teleporter doAction robots are put randomly like this onto free fields:
    
		 ?
		?T?		?...field free?
		 ?		T...teleporter
 
Overrides:
doAction in class Reactable
Parameters:
robot - the Robot for which doAction should be executed

setTeleport

public void setTeleport(Teleport elem)
sets the Teleporter or if already set its partner
Parameters:
elem - the Teleporter to be set/ added

getTeleport

public Teleport getTeleport()
get method for the teleport-partner
Returns:
teleport the actual teleport