예제 #1
0
 private int valueInt(String s) {
   if (s == Normal.toString()) {
     return 0;
   } else if (s == Math.toString()) {
     return 1;
   } else if (s == Puzzle.toString()) {
     return 2;
   } else if (s == Shake.toString()) {
     return 3;
   }
   return -1;
 }
예제 #2
0
 public static String valueString(int i) {
   switch (i) {
     case 0:
       return Normal.toString();
     case 1:
       return Math.toString();
     case 2:
       return Puzzle.toString();
     case 3:
       return Shake.toString();
   }
   return null;
 }