AuthorMessage
jackel
n00b
Posts: 41

ANY help or advice on what the i++ bit at end of loop  does the i++ bit im a lil confused about , but il get there TIA ;)
--//EDIT - MEKA - please remember to put code brackets around actual code.
Code:

public class loops {
   public static void main (String [] args) {
      PacmanGame main = new PacmanGame();
      main.setMap ("blank");
      main.showGame();
      for (int i = 0; i < 19; i++) {
         main.move();
      }
      main.turnRight();
      for (int i = 0; i < 19; i++) {
         main.move();
      }
      main.turnRight();
      for (int i = 0; i < 19; i++) {
         main.move();
      }
      main.turnRight();
      for (int i = 0; i < 19; i++) {
         main.move();
      }
      main.turnRight();
   }
}

         R€€SP€CT -J@C-
                                                                                  ^_~
Meka][Meka
Unstopable
Posts: 700

in a way i = i + 1
jackel
n00b
Posts: 41

cheers meka ;) i wont forget to keep all code inside brackets br3 & all loop go in norm brckts im cool with that now if me was to loop again nxt loop wud be -- > for (int i = 0; i < 19; i++) but instead of using i it wud be  j  or whatever letter, just J for example if me was to loop again wudnt it?... As i cant call var with same name twice;-) ,so nething lesser than 19 goes back to loop again but must stop at 19  becouse pacman only has to move 19 dots on this ocasion in this programme;) cheers br3 >.< GETTING THERE & its gd buzz when things go right eh
R€€SP€Ct-C0m!NG@YA-P34C30UT-MEKA
']['€AM€LiT€-I$-4-LiF€
 -TE-jackel  ('