Class AlienSpaceCraft

java.lang.Object
  extended bySpaceCraft
      extended byAlienSpaceCraft

public class AlienSpaceCraft
extends SpaceCraft

Author:
bachmaer Maintains the state information for an AlienSpaceCraft

Field Summary
 
Fields inherited from class SpaceCraft
heading, ID, IDport, xPosition, yPosition
 
Constructor Summary
AlienSpaceCraft(java.net.InetAddress ID, int IDport, int x, int y, int heading)
          Creates an AlienSpaceCraft with the values of the input parameters
 
Method Summary
 void draw(java.awt.Graphics g)
          Renders the alien space craft as a red dot.
 
Methods inherited from class SpaceCraft
equals, getHeading, getXPosition, getYPosition, setHeading, setX, setY, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlienSpaceCraft

public AlienSpaceCraft(java.net.InetAddress ID,
                       int IDport,
                       int x,
                       int y,
                       int heading)
Creates an AlienSpaceCraft with the values of the input parameters

Parameters:
ID - IP address associate with the ship
x - position of the ship
y - position of the ship
heading - of the ship
Method Detail

draw

public void draw(java.awt.Graphics g)
Renders the alien space craft as a red dot. A small line segment points in the direction of the heading.

Overrides:
draw in class SpaceCraft
Parameters:
g - Graphical render context
Returns:
current x position