Jack Posted June 21, 2013 Posted June 21, 2013 Here is code to always choose a world that is available... http://pastebin.com/ZZwJszEc 1
Dog_ Posted June 21, 2013 Posted June 21, 2013 Terrible code.. if(worldNum < 301||worldNum == 301 wat... learn to <= m8 1
Jack Posted June 22, 2013 Author Posted June 22, 2013 (edited) Terrible code.. if(worldNum < 301||worldNum == 301 wat... learn to <= m8 I did that so if I look back on it later, I know what the hell I was doing. I got an A both semesters of Ap Java, so I know how to write code. Edited June 22, 2013 by 25sittin25m
Ledo Posted June 22, 2013 Posted June 22, 2013 public static final int[] WORLDS = { 301, 302, 303, 304 }; int world = WORLDS[random(WORLDS.length - 1)]; worldHopper.hopWorld(world); Three lines of code compared to yours...