Class Portal

java.lang.Object
  extended by Item
      extended by Portal
All Implemented Interfaces:
java.io.Serializable

public class Portal
extends Item

See Also:
Serialized Form

Field Summary
 boolean ableToTeleportReceived
           
private  java.lang.String description
           
static int FLUSH
           
private  AnimatedImage flushImage
           
private  int isOnline
           
 java.util.Set itemsToBeTeleported
           
static int OFF
           
private  AnimatedImage offImage
           
static int ON
           
private  AnimatedImage onImage
           
private  Portal receiver
           
private  int teleportDistance
           
 
Constructor Summary
Portal(Vector pos, Environment env)
           
 
Method Summary
 void action()
           
protected  java.lang.String className()
           
 int currentState()
           
 boolean isOnline()
           
static void pairPortals(Portal a, Portal b)
           
 void receiveItems()
           
 Portal receiver()
           
 void setOnline(int b)
           
 void setReceiver(Portal p)
           
 void toImage(java.awt.Graphics g, Vector pos, double zoom)
           
 
Methods inherited from class Item
age, classImage, color, displacement, displacement, distanceFrom, distanceFrom, environment, image, incrementAge, isActive, isAlive, isEdible, isPortable, isPushable, isSolid, message, messageCounter, performSpecificFunction, position, radiusOfContact, reduceMessageCounter, remove, setActive, setAge, setColor, setEnvironment, setImage, setMessage, setPosition, setRadiusOfContact, showMessage, theCloser, touchingDistance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OFF

public static final int OFF
See Also:
Constant Field Values

FLUSH

public static final int FLUSH
See Also:
Constant Field Values

ON

public static final int ON
See Also:
Constant Field Values

onImage

private AnimatedImage onImage

offImage

private AnimatedImage offImage

flushImage

private AnimatedImage flushImage

isOnline

private int isOnline

teleportDistance

private int teleportDistance

description

private java.lang.String description

itemsToBeTeleported

public java.util.Set itemsToBeTeleported

ableToTeleportReceived

public boolean ableToTeleportReceived

receiver

private Portal receiver
Constructor Detail

Portal

public Portal(Vector pos,
              Environment env)
Method Detail

isOnline

public boolean isOnline()

currentState

public int currentState()

setOnline

public void setOnline(int b)

receiveItems

public void receiveItems()

receiver

public Portal receiver()

setReceiver

public void setReceiver(Portal p)

action

public void action()
Overrides:
action in class Item

toImage

public void toImage(java.awt.Graphics g,
                    Vector pos,
                    double zoom)
Overrides:
toImage in class Item

className

protected java.lang.String className()
Overrides:
className in class Item

pairPortals

public static void pairPortals(Portal a,
                               Portal b)