public void run() {

      // while thread is alive continue always!
      while ( true ) {

        synchronized (this) {

          // check if thread is paused...
          while ( threadPause ) {
            try {

              // ...and keep it waiting, as long as paused
              wait ();
            }
            catch (InterruptedException e1) {
              e1.printStackTrace ();
            }
          }
          
          if ( currentColor == WHITE ) {
            // ...let player one make a move
            makeAmove (p1);
          }
          else if(currentColor==BLACK){
            // ... let player2 make a move
            makeAmove (p2);
          }
        }

        // while thread is not paused run the game: if currentColor is White...

        
        
      }
    }