Welcome to the Java Programming Forums


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.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

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

  1. #1
    Junior Member
    Join Date
    Jul 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default 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.


  2. #2
    Junior Member
    Join Date
    Jul 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

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

    Hello! Can someone please give me any advice!

  3. #3
    Junior Member
    Join Date
    Jul 2012
    Posts
    6
    Thanks
    3
    Thanked 0 Times in 0 Posts

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

    Does anyone know how to set up the AI to always lose? or something....

  4. #4
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,254
    My Mood
    Hungover
    Thanks
    142
    Thanked 617 Times in 528 Posts

    Default 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?
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

Similar Threads

  1. Pong game - Collision detection
    By Hokap in forum Java Theory & Questions
    Replies: 73
    Last Post: May 13th, 2012, 04:11 PM
  2. Shutdown Remote Computer using java....
    By pupivama in forum Member Introductions
    Replies: 1
    Last Post: May 8th, 2012, 07:44 AM
  3. HELP! Java not working at all on my computer
    By Vikkan in forum Java SE APIs
    Replies: 2
    Last Post: March 6th, 2012, 12:04 PM
  4. [SOLVED] Pong: Ricochet off Paddle Issue
    By Staticity in forum What's Wrong With My Code?
    Replies: 1
    Last Post: October 25th, 2011, 06:57 AM
  5. [SOLVED] Fixing of bug for Pong game
    By phoenix in forum What's Wrong With My Code?
    Replies: 11
    Last Post: July 14th, 2009, 01:19 PM