Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Someone take a look at my Java code
Closed Thread
Old 06-19-2007, 02:33 PM   #1 (permalink)
 
True Techie

Join Date: Nov 2006

Posts: 111

PnkFloyd27

Default Someone take a look at my Java code

I've been having a lot of problems with my code. I have nobody to help me learn Java so it's getting very confusing and difficult. If someone could please take a look at my program and tell me what I need to do to fix it, it would be greatly appreciated. Or, if you wanted to fix it for me and then make comments in the code to tell me what you did and what it does so that I could learn from it, that would be even better. But all that I really want is for someone to help me fix my code. Thank you very much.
Attached Files
File Type: txt GameManager.txt (2.4 KB, 38 views)
File Type: txt Robot.txt (2.5 KB, 39 views)
File Type: txt Shop.txt (1.9 KB, 45 views)
File Type: txt Welcome.txt (296 Bytes, 44 views)
PnkFloyd27 is offline  
Old 06-19-2007, 07:55 PM   #2 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default Re: Someone take a look at my Java code

So what's wrong with it? You should probably post what problems you're having specifically if you want help.
jaeusm is offline  
Old 06-19-2007, 08:10 PM   #3 (permalink)
 
True Techie

Join Date: Nov 2006

Posts: 111

PnkFloyd27

Default Re: Someone take a look at my Java code

I'm having a ton of problems. Try compiling them yourself, you'll see.
PnkFloyd27 is offline  
Old 06-20-2007, 12:05 AM   #4 (permalink)
 
Software Developer

Join Date: Mar 2006

Location: Columbus, OH

Posts: 569

jaeusm is on a distinguished road

Default Re: Someone take a look at my Java code

Sorry, chief. I'm not doing your work for you. If you want help, post specific questions.
jaeusm is offline  
Old 06-21-2007, 08:11 PM   #5 (permalink)
 
Monster Techie

Join Date: May 2004

Location: Tucson, AZ, USA

Posts: 1,183

Vormund

Send a message via AIM to Vormund Send a message via MSN to Vormund Send a message via Yahoo to Vormund
Default Re: Someone take a look at my Java code

Har har. All method names should start with a lower-case letter, and all class names should start with a capital letter. Standards, ya know?

I don't have time to compile it either, but if you have somewhat specific questions, feel free to ask.

One thing I see (coding-wise),
if (ShopBattle.equals("battle")||ShopBattle.equals("B attle"))

You can just do,
if (myString.toLowerCase( ) == "battle")
to save a little room/effort.

And I'm not sure, but it looks like you want four classes,
GameManager
--Shop
--Player
----Robot

As the manager would run the show, a "shop" would have items or something, player for each person and/or AI, and robots for the players.

A huge problem with your current setup is you'll be referencing the same object for all players, that is, unless each player can only have one robot. If that's the case, then you just wouldn't need the Player class.
__________________
Vormund is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
hacking online java program. Z e i g Browser & General Internet Questions 8 06-23-2007 01:50 AM
Java Game Yek Programming Discussions 5 06-16-2007 04:29 AM
Abit AN8 post code error: 50 - initialize usb. IGeMex Hardware Troubleshooting 1 06-05-2007 06:01 PM
NEED help with a Javascript code...(mouseover and stuff) Quintox Web Graphics, Design, Digital Images 7 05-02-2007 06:41 PM
JavaScript Botnet Code Leaked To Internet Osiris Virus - Spyware Protection / Detection 0 04-02-2007 09:05 PM