public void statoRaggiunto(StatoInterface st, Vector q) {
   if (mode == MODE_FW) return;
   if ((((Stato) st).getCol() < 0) || (((Stato) st).getRow() < 0)) {
     worldBoard.removeScimmia();
     frame.enableButtonsDown(true);
   } else {
     if (mode == MODE_STEP) {
       if (!st.isStop()) {
         worldBoard.moveScimmia(((Stato) st).getCol(), ((Stato) st).getRow());
         try {
           synchronized (th) {
             frame.enableButtonsDown(true);
             th.wait();
           }
         } catch (InterruptedException e) {
           e.printStackTrace();
         }
       } else {
         worldBoard.removeScimmia();
         frame.enableButtonsDown(true);
       }
     } else if (mode == MODE_ONE_EPOCH) {
       if (!st.isStop()) worldBoard.placeScimmia(((Stato) st).getCol(), ((Stato) st).getRow());
       else {
         worldBoard.removeScimmia();
         frame.enableButtonsDown(true);
       }
     }
   }
 }
 public void statoPartenza(StatoInterface st, Vector q) {
   if (mode == MODE_FW) return;
   worldBoard.placeScimmia(((Stato) st).getCol(), ((Stato) st).getRow());
   if (mode == MODE_STEP) {
     try {
       synchronized (th) {
         frame.enableButtonsDown(true);
         th.wait();
       }
     } catch (InterruptedException e) {
       e.printStackTrace();
     }
   }
 }
 public void setFWMode() {
   mode = MODE_FW;
   worldBoard.removeScimmia();
 }
 public void terminatoUse() {
   worldBoard.removeScimmia();
   frame.resetModeUse();
   frame.enableButtonsDown(true);
 }
 public synchronized boolean moveToUse(StatoInterface st) {
   worldBoard.moveScimmia(((Stato) st).getCol(), ((Stato) st).getRow());
   synchronized (th) {
     return !stopUse;
   }
 }
 public void statoPartenzaUse(StatoInterface st) {
   worldBoard.placeScimmia(((Stato) st).getCol(), ((Stato) st).getRow());
 }
 public void aggiornamentoQ(StatoInterface st, Vector v) {
   worldBoard.aggiornaQ(((Stato) st).getCol(), ((Stato) st).getRow(), v);
 }