logitech1

Members
  • Content count

    3
  • Joined

  • Last visited

Community Reputation

121 Neutral

About logitech1

  • Rank
    Newbie
  1. Question guys, need some help about sorting using arraylist, i don't know why it doesn't sort at all.. >_< sorry for the post.   public class Driver2 {          static Random r = new Random();     public static void main(String[]args) {              ArrayList<Integer> list = new ArrayList<Integer>();                  for(int i = 0 ; i < 3 ; i++) {             list.add(rollDice());         }                  for(Integer g : list)         System.out.println(g);                  for(int index = 0 ; index < list.size() ; index++) {             for(int i = 1 ; i < list.size() - 1 ; i++) {                                  if(list.get(index) < list.get(i)) {                     int temp = list.get(index);                     list.remove(index);                     list.add(index , list.get(i));                     list.remove(i);                     list.add(i, temp);                 }             }         }                  for(Integer g : list)             System.out.println(g);              }          public static int rollDice() {                  int temp;         temp = (1 + r.nextInt(6));                  return temp;     } }
  2. Text-TurnedBase java

    well i did. i have a concrete class called World and Town, Training ground etc, is there. but, as method call. not a class.. is it okay to do that if my project is just small like this?? 
  3. Text-TurnedBase java

    Hi guys, im new here in game development so, please bear with my noob questions.. just asking, about game states.. as of now, im working on a small textbased-semi RPG game,..  in the game i have: MainGameStates: ---------------------------------- Start Option Exit just asking if i can treat this places Town TrainingGrounds Coliiseum also as game state??  what do you think is much easier to implement game states in a game?? i mean, if switch case or enum class or anything you suggest Regards,