Пример #1
0
 public Turn mirrorTurn(Turn translation) {
   return this.lookupMirrors()[translation.getAxis().ordinal()];
 }
Пример #2
0
 /**
  * @param stringRepresentation the String representation of a Turn
  * @return the according Turn, if the stringRepresentation was valid
  */
 public static Turn byString(String stringRepresentation) {
   for (Turn turn : Turn.values())
     for (String rep : turn.stringRepresentation)
       if (rep.equals(stringRepresentation)) return turn;
   return null;
 }
Пример #3
0
 public Turn translateTurn(Turn translation) {
   if (!translation.isCubeRotation()) return null;
   return this.lookUpTranslations()[translation.ordinal() - 18];
 }
Пример #4
0
 /** @return the inverse Turn of the current one. */
 public Turn inverse() {
   return Turn.values()[this.ordinal() ^ 1];
 }