import java.util.*;
import hsa.Console;
import java.awt.Color;
public class Alien
{
static Console c; // The output console
public static void main (String[] args)
{
c = new Console ("My Alien Creature");
int heightOfWindow, widthOfWindow, time, star;
double x, y;
x = 0;
y = 0;
//c.println ("Please enter two numbers.");
//c.println ("\nThe Alien controlling the spaceship will then fly the ship between both of the \nintegers that you entered.");
//x = c.readInt ();
//y = c.readInt ();
// c.clear();
{
//Drawing Commands for my Space Ship
c.setColor (Color.black); //Night Sky
c.fillRect (0, 0, 800, 800);
c.setColor (Color.green);
c.fillRect (0, 425, 850, 425);
c.setColor (Color.blue); //Floor; Ground
c.fillRect (85, 225, 200, 200); //House Rectangle
c.setColor (Color.blue);
c.fillRect (85, 225, 200, 200);
c.setColor (Color.cyan);
c.fillRect (195, 325, 50, 100); //Window Square
c.setColor (Color.red);
c.fillRect (195, 325, 50, 100);
c.setColor (Color.cyan);
c.fillRect (115, 325, 50, 50); //Door Rectangle
c.setColor (Color.green);
c.fillOval (350, 275, 200, 65); //Body
c.setColor (Color.red);
c.fillOval (375, 305, 15, 10); //Upper Portion
c.setColor (Color.red);
c.fillOval (505, 305, 15, 10); //Head
c.setColor (Color.green);
c.fillOval (395, 250, 105, 40); // Spaceship
c.setColor (Color.blue);
c.fillOval (505, 75, 100, 85); //Dot on Spaceship
c.setColor (Color.red);
c.fillOval (425, 215, 11, 6); //EYE #1
c.setColor (Color.red);
c.fillOval (450, 215, 11, 6); //EYE #2
c.setColor (Color.green);
c.fillOval (417, 199, 58, 50); // Other Dot on Spaceship
c.setColor (Color.red);
c.drawLine (450, 205, 475, 185);
c.setColor (Color.red);
c.drawLine (435, 205, 410, 185);
c.setColor (Color.blue);
c.drawLine (85, 225, 185, 115);
c.setColor (Color.blue);
c.drawLine (285, 225, 185, 115);
}
{
delay ();
}
}
public static void delay ()
{
int heightOfWindow = 100;
int widthOfWindow = c.getWidth ();
int time = 0;
int star = 0;
for (star = 0 ; star < 20 ; star++)
{
double x = java.lang.Math.random ();
double y = java.lang.Math.random ();
int xInt = (int) (x * widthOfWindow);
int yInt = (int) (y * heightOfWindow);
c.setColor (Color.yellow);
c.fillStar (xInt, yInt, 50, 50);
//generate random number
}
}
}