Class Muscle

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

public class Muscle
extends Teather

See Also:
Serialized Form

Field Summary
private  MovingItem A
           
private  MovingItem B
           
private  boolean expanding
           
private  double maxLength
           
private  double minLength
           
private  boolean oscillating
           
private  double speed
           
 
Constructor Summary
Muscle(MovingItem a, MovingItem b, double len)
           
Muscle(MovingItem a, MovingItem b, double min, double max)
           
 
Method Summary
 void action()
           
 boolean expanding()
           
 double maxLength()
           
 double minLength()
           
 boolean oscillating()
           
 void setMaxLength(double m)
           
 void setMinLength(double m)
           
 void setSpeed(double s)
           
 double speed()
           
 void switchAnchor()
           
 void toggleExpanding(boolean b)
           
 void toggleOscillating(boolean b)
           
 
Methods inherited from class Teather
anchorItem, classImage, isSolid, length, setAnchorItem, setLength, setTeatherItem, teatherItem
 
Methods inherited from class Item
age, className, color, displacement, displacement, distanceFrom, distanceFrom, environment, image, incrementAge, isActive, isAlive, isEdible, isPortable, isPushable, message, messageCounter, performSpecificFunction, position, radiusOfContact, reduceMessageCounter, remove, setActive, setAge, setColor, setEnvironment, setImage, setMessage, setPosition, setRadiusOfContact, showMessage, theCloser, toImage, touchingDistance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

A

private MovingItem A

B

private MovingItem B

minLength

private double minLength

maxLength

private double maxLength

speed

private double speed

expanding

private boolean expanding

oscillating

private boolean oscillating
Constructor Detail

Muscle

public Muscle(MovingItem a,
              MovingItem b,
              double min,
              double max)

Muscle

public Muscle(MovingItem a,
              MovingItem b,
              double len)
Method Detail

speed

public double speed()

setSpeed

public void setSpeed(double s)

maxLength

public double maxLength()

setMaxLength

public void setMaxLength(double m)

minLength

public double minLength()

setMinLength

public void setMinLength(double m)

expanding

public boolean expanding()

toggleExpanding

public void toggleExpanding(boolean b)

switchAnchor

public void switchAnchor()

oscillating

public boolean oscillating()

toggleOscillating

public void toggleOscillating(boolean b)

action

public void action()
Overrides:
action in class Teather