Search:

Type: Posts; User: Norm

Search: Search took 0.09 seconds.

  1. Re: Help with Snake Game Java Code: It's Impossible to Lose the Game

    Use a listener.
  2. Re: Help with Snake Game Java Code: It's Impossible to Lose the Game

    Change the values of x and y as the window is resized,
  3. Re: Help with Snake Game Java Code: It's Impossible to Lose the Game

    The game could adjust it self to the size of the window. It shouldn't have hardcoded values for the location of the boundaries.
  4. Re: Help with Snake Game Java Code: It's Impossible to Lose the Game

    Can you use the boundary of the window where the snake is moving? For example locations 0 and width or height?
  5. Re: Help with Snake Game Java Code: It's Impossible to Lose the Game

    Same response. Please explain what you are trying to do.
  6. Re: Help with Snake Game Java Code: It's Impossible to Lose the Game

    Please explain.
  7. Re: Help with Snake Game Java Code: It's Impossible to Lose the Game

    That's not now actionlisteners work. They are for handling user actions like when a button is pressed.
  8. Re: Help with Snake Game Java Code: It's Impossible to Lose the Game

    What problems are you trying to solve with the action listener
    and with the rectangle?
  9. Re: Help with Snake Game Java Code: It's Impossible to Lose the Game

    This would be one place to print out the variables:

    What variables are hitting the boundaries? Where and how should the boundary be detected?
  10. Re: Help with Snake Game Java Code: It's Impossible to Lose the Game

    Try debugging your code by adding println() statements to show execution progress and how variable values are changing. For example:
    Add a: System.out.println("var=" + var);
    after every line where...
Results 1 to 10 of 10