morey.spore
Class Type
java.lang.Object
|
+--morey.spore.SporeAction
|
+--morey.spore.Type
- public class Type
- extends SporeAction
- implements java.lang.Cloneable
Used to change the type/team/colour of the spore. This is to make things
pretty.
Here
is a link to the source code
- See Also:
Right,
Left,
Claim,
Flip,
Spawn
|
Field Summary |
protected static double |
EXECUTE
|
protected int |
type
the type/team/colour to change the spore |
|
Constructor Summary |
Type(int type)
construct a type change... |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
EXECUTE
protected static final double EXECUTE
type
protected final int type
- the type/team/colour to change the spore
Type
public Type(int type)
- construct a type change...
getExecutionTime
public double getExecutionTime(Spore s,
Processor cpu)
- gets up the time of execution for the next action
- Overrides:
- getExecutionTime in class SporeAction
- Parameters:
s - the spore wanting to execute the actioncpu - that executes this action (and required info...)- Returns:
- the time of execution
executeAction
public boolean executeAction(Spore s,
Processor cpu)
- change the type of a spore
- Overrides:
- executeAction in class SporeAction
- Returns:
- true (can't die from changing colour)
toString
public java.lang.String toString()
- Gives a String representation of this
- Overrides:
- toString in class java.lang.Object