Posted: Fri Jun 18, 2004 5:29 pm Post subject: drunk walking home in snow simulator
code:
// The "G" class.
import java.awt.*;
import hsa.Console;
public class G
{
static Console c; // The output console
public static void main (String[] args)
{
c = new Console ();
int x = 50;
int y = 10;
int xFive = 1;
int yFive = 10;
while (true)
{
xFive = (int) (Math.random () * 10) + 1;
yFive = (int) (Math.random () * 10) + 1;
try
{
Thread.sleep (5);
}
catch (Exception e)
{
}
c.drawOval (x, y, 5, 5);
x = x + xFive;
y = y + yFive;
if (x > 500 || x < 0)
{
xFive = -xFive;
}
else if (y > 500 || y < 0)
{
yFive = -yFive;
}
}
// Place your program here. 'c' is the output console
} // main method
} // G class
Sponsor Sponsor
xtreemboarder
Posted: Mon Jan 09, 2006 10:57 am Post subject: (No subject)
you suck fat ass
Naveg
Posted: Mon Jan 09, 2006 11:16 pm Post subject: (No subject)
We really have to introduce zero tolerance for this kind of thing...
rizzix
Posted: Mon Jan 09, 2006 11:39 pm Post subject: (No subject)