コード例 #1
0
 private void btn_Solve2ActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btn_Solve2ActionPerformed
   if (nextMove > 0 && nextMove <= moveList.size()) {
     nextMove--;
     int move = moveList.get(nextMove);
     for (int j = 4; j > (move % 3) + 1; j--) {
       cube = model.DoMove(cube, TurnAxis.values()[(int) (move / 3)]);
     }
     updateC();
   }
 } // GEN-LAST:event_btn_Solve2ActionPerformed
コード例 #2
0
 private void btn_Solve1ActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btn_Solve1ActionPerformed
   if (nextMove >= 0 && nextMove < moveList.size()) {
     int move = moveList.get(nextMove);
     for (int j = 0; j < (move % 3) + 1; j++) {
       cube = model.DoMove(cube, TurnAxis.values()[(int) (move / 3)]);
     }
     nextMove++;
     updateC();
   }
 } // GEN-LAST:event_btn_Solve1ActionPerformed
コード例 #3
0
 private void jButton7ActionPerformed(
     java.awt.event.ActionEvent evt) { // GEN-FIRST:event_jButton7ActionPerformed
   cube = model.DoMove(cube, TurnAxis.B);
   updateC();
 } // GEN-LAST:event_jButton7ActionPerformed