Trull

edu.luc.cs.trull.demo.battleship
Class Ship

java.lang.Object
  extended by edu.luc.cs.trull.EmptyComponent
      extended by edu.luc.cs.trull.TerminatingComponent
          extended by edu.luc.cs.trull.AbstractComponent
              extended by edu.luc.cs.trull.AbstractCombinator
                  extended by edu.luc.cs.trull.Control
                      extended by edu.luc.cs.trull.AwaitOne
                          extended by edu.luc.cs.trull.demo.battleship.Ship
All Implemented Interfaces:
Combinator, Component, EventLabels, PropertyChangeSource, Startable, Suspendable, Terminating, java.beans.PropertyChangeListener, java.util.EventListener

 class Ship
extends AwaitOne
implements EventLabels

A ship of a given length and witdh.


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.luc.cs.trull.Control
Control.BodyListener, Control.HandlerListener
 
Nested classes/interfaces inherited from class edu.luc.cs.trull.AbstractCombinator
AbstractCombinator.DefaultTerminationListener
 
Field Summary
(package private)  int left
           
(package private)  int length
           
(package private)  boolean[][] shot
           
(package private)  int width
           
(package private)  int x
           
(package private)  int y
           
 
Fields inherited from class edu.luc.cs.trull.Control
BODY, HANDLER
 
Fields inherited from class edu.luc.cs.trull.AbstractCombinator
components
 
Fields inherited from interface edu.luc.cs.trull.demo.battleship.EventLabels
HIT, PLACE, SHOT, SUNK
 
Constructor Summary
Ship(int l, int w)
           
 
Method Summary
 
Methods inherited from class edu.luc.cs.trull.Control
addComponent, addComponent, getBody, getChildTerminationListener, getDefaultBody, getDefaultHandler, getHandler, getStartAction, getStartEvents, getStopAction, getStopEvents, propertyChange, resume, setBody, setHandler, setStartAction, setStartEvent, setStartEvents, setStartEvents, setStopAction, setStopEvent, setStopEvents, setStopEvents, start, startChild, stop, stopChild, suspend
 
Methods inherited from class edu.luc.cs.trull.AbstractCombinator
addComponent, getComponent, getComponentCount, getComponents, removeAllComponents, removeComponent, removeComponent
 
Methods inherited from class edu.luc.cs.trull.AbstractComponent
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getExternalListeners, getPropertyChangeListeners, removePropertyChangeListener
 
Methods inherited from class edu.luc.cs.trull.TerminatingComponent
fireTermination, getParent, getTermEvent, scheduleTermination, setTerminationListener
 
Methods inherited from class edu.luc.cs.trull.EmptyComponent
getTerminationListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.luc.cs.trull.PropertyChangeSource
addPropertyChangeListener, getPropertyChangeListeners, removePropertyChangeListener
 
Methods inherited from interface edu.luc.cs.trull.Terminating
getTerminationListener, setTerminationListener
 

Field Detail

left

int left

length

int length

shot

boolean[][] shot

width

int width

x

int x

y

int y
Constructor Detail

Ship

public Ship(int l,
            int w)

Trull

http://www.cs.luc.edu/trull/