@Override
  public void update(Observable o, Object arg) {
    if(this.model.getCurrentPlayer() == this.player && 
        this.model.getGameState() == GameState.DURING) {
      ArrayList<Piece> validMoves = this.model.getBoard()
          .getValidMoves(this.player.getColor());
      
      if(validMoves.size() > 0) {
        depth = 0;
        int moveIndex = getBestMove(this.model.getBoard().getDeepCopy(), validMoves);
        
        this.model.getBoard().makeMove(validMoves.get(moveIndex));
      }
    }
  }