Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 drunk walking home in snow simulator
Index -> Programming, Java -> Java Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
ify




PostPosted: 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
Sponsor
sponsor
xtreemboarder




PostPosted: Mon Jan 09, 2006 10:57 am   Post subject: (No subject)

you suck fat ass
Naveg




PostPosted: Mon Jan 09, 2006 11:16 pm   Post subject: (No subject)

We really have to introduce zero tolerance for this kind of thing...
rizzix




PostPosted: Mon Jan 09, 2006 11:39 pm   Post subject: (No subject)

second time, banned.
Display posts from previous:   
   Index -> Programming, Java -> Java Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 4 Posts ]
Jump to:   


Style:  
Search: