News:

Happy New Year! Yes, the current one, not a previous one; this is a new post, we swear!

Main Menu

[Java] Pinball Game!

Started by Joe, September 16, 2005, 10:44:27 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joe

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
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Hdx

Ya I got a question.
Can I help? i'm bored.
~-~(HDX)~-~
http://img140.exs.cx/img140/6720/hdxnew6lb.gif
09/08/05 - Clan SBs @ USEast
[19:59:04.000] <DeadHelp> We don't like customers.
[19:59:05.922] <DeadHelp> They're assholes
[19:59:08.094] <DeadHelp> And they're never right.

Joe

Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Joe

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.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


Joe

I gave up on the "pencil and paper" approach of UltraEdit-32 and javac. Using Eclipse now.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.