The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

How to defeat computer in a Java game? (Pong)

In the java game Pong, how do you defeat the computer? What is the code, method, or whatever that allows you to defeat the comp. please help me i need to turn this in for class. I need help. Anything will be appreciated. thanks

EDIT:

So pretty much my class has received the assignment of editing the code given to us so the Player we create defeats the computer. In this case, the computer is WON and the player we must create is Pan.java. I'm using emacs to try and come up with a solution for this however I have not gotten anywhere. I need my player to play itself, and directly defeat the computer.

Last edited by DJBENZ10; July 13th, 2012 at 03:01 AM.
Reason: Need to be more descriptive.

Re: How to defeat computer in a Java game? (Pong)

Stop bumping your thread. It just makes you look impatient, and in fact lowers your chances of getting help because people will see your thread has replies and will assume somebody else has already replied to you.

You're going to have to be much more specific than that. We aren't just going to do your homework for you. What have you tried? Where are you stuck?