Clan x86

Technical (Development, Security, etc.) => General Programming => Topic started by: Joe on September 16, 2005, 10:44:27 PM

Title: [Java] Pinball Game!
Post by: Joe on September 16, 2005, 10:44:27 PM
This is my first real project in Java. The AP computer programming class is doing it (as a group) and I'd like to give it a shot.

Do I think I'll finish it? No.
Will I give it a good try? Yes.
Does this mean you will never give up? No.

Any questions?

EDIT -
Compiler/Editor: Eclipse

http://www.javaop.com/~joe/jpinball/JPinball.zip
Title: Re: [Java] Pinball Game!
Post by: Hdx on September 16, 2005, 10:59:31 PM
Ya I got a question.
Can I help? i'm bored.
~-~(HDX)~-~
Title: Re: [Java] Pinball Game!
Post by: Joe on September 16, 2005, 11:03:13 PM
AIM, gogo.
Title: Re: [Java] Pinball Game!
Post by: Joe on September 16, 2005, 11:20:48 PM
Output.java:

public class Output {
  // Output type constants
  // 0 - Debug
  // 1 - Info
  // 2 - Warning
  // 3 - Critical Error
  // 4 - Raw
 
  public static void main(String args[]) {
    System.out.println("This file is a dependancy only, and can not be run by itself.");
  }
 
  public static void out(int type, String data) {
    switch(type) {
      case 0: //debug
        //if debugging {
          System.out.println("[DEBUG] " + data);
        //}
        break;
      case 1: //info
        System.out.println("[INFO] " + data);
        break;
      case 2: //warning
        System.out.println("[WARNING] " + data);
        break;
      case 3: //crit error
        System.out.println("[ERROR] " + data);
        break;
      case 4: //raw
        System.out.println(data);
        break;
    }
  }
}


TODO:
Finish debug-enabled checking
Add constants
Inherit needed stuff (the propertybag)
Set a package, etc

Comment.
Title: Re: [Java] Pinball Game!
Post by: Joe on September 18, 2005, 02:31:30 AM
I gave up on the "pencil and paper" approach of UltraEdit-32 and javac. Using Eclipse now.