gnu.app.displayhack
Class Squiral.Worm

java.lang.Object
  extended by gnu.app.displayhack.Squiral.Worm
Enclosing class:
Squiral

public class Squiral.Worm
extends java.lang.Object


Field Summary
 Color color
           
 int direction
          Direction of its head.
 boolean left_handed
           
 int x
           
 int y
           
 
Constructor Summary
Squiral.Worm()
           
 
Method Summary
 int clockwise()
           
 int counter_clockwise()
           
 void go()
           
 void go(int x, int y)
           
 void init()
           
 boolean try_go(int direction)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

color

public Color color

left_handed

public boolean left_handed

x

public int x

y

public int y

direction

public int direction
Direction of its head. Valid: 0 (north), 1 (east), 2 (south), 3 (west).

Constructor Detail

Squiral.Worm

public Squiral.Worm()
Method Detail

clockwise

public int clockwise()

counter_clockwise

public int counter_clockwise()

go

public void go()

go

public void go(int x,
               int y)

init

public void init()

try_go

public boolean try_go(int direction)
Returns:
true if successful