Search:

Type: Posts; User: bmxershane

Search: Search took 0.20 seconds.

  1. Replies
    4
    Views
    1,005

    Re: Loop conditions not working

    oh my god guys thanks for your help but i found out what was wrong, i was meant to be using the || to say OR rather than using AND to achieve what i wanted, feel like a goose now hahaha
  2. Replies
    4
    Views
    1,005

    Re: Loop conditions not working

    sorry guys, itemsCollected() is boolean and player.getPosition() is an int. The problem im having is that if the players position(player.getPosition()) does equal the exit position...
  3. Replies
    4
    Views
    1,005

    Loop conditions not working

    I have the following code for entering loops:
    public void play()
    {
    System.out.println(toString());
    while(player.getPosition() != exit.getPosition() && itemsCollected() ==...
Results 1 to 3 of 3