Results 1 to 2 of 2
  1. #1
    Rekuta is offline Member
    Join Date
    May 2010
    Posts
    6
    Rep Power
    0

    Default Problem to stop printing statements

    I have a problem to stop printing those statements:


    if (Math.abs(Player1.LeftRightLocation - Snake1.LeftRightLocation) < 5)
    if (Math.abs(Player1.UpDownLocation - Snake1.UpDownLocation) < 4)

    {

    System.out.println("\nDeathPoints = " + Snake1.DeathPoints);
    System.out.println("ForcePoints = " + Snake1.ForcePoints);
    System.out.println("PowerLevel = " + Snake1.PowerLevel);

    Snake1.MonsterAttack = 1;
    }

    into this :

    if(Snake1.DeathPoints == 0)
    {
    System.out.print("You defeated the snake !");
    Snake1.MonsterAttack = 0;
    Player1.Attack = 0;
    Player1.Defense = 0;
    //Player1.Experience = Player1.Experience + 50;
    }
    I would like to not display the stats of my monster once it is destroyed, but i do not know how to do it. Please help.

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,648
    Blog Entries
    7
    Rep Power
    21

Similar Threads

  1. Replies: 6
    Last Post: 02-20-2010, 03:27 AM
  2. Problem printing an array
    By denial in forum New To Java
    Replies: 3
    Last Post: 11-01-2009, 10:09 PM
  3. Printing ranges of numbers using if/else statements
    By russbuss106 in forum New To Java
    Replies: 8
    Last Post: 03-05-2009, 05:03 AM
  4. Problem after Printing GUI.
    By coldblood22 in forum AWT / Swing
    Replies: 1
    Last Post: 04-05-2008, 02:43 PM
  5. printing problem
    By ntpl in forum AWT / Swing
    Replies: 0
    Last Post: 11-27-2007, 11:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •