private static void findEnemyFlag(Board b) {
      int row, col;
      
      row = enemyHQL.getRow();
      col = enemyHQL.getCol();
      
      // if it is certain that enemy flag is on the left
      if (b.getPiece(row, col).getRank().equals(Rank.Flag) &&
          !b.getPiece(row, col).getOurSide()) {
         enemyFlag = new Position(row, col);
      }
      else {
         row = enemyHQR.getRow();
         col = enemyHQR.getCol();
         
         // if we haven't capture the right side HQ
         // then we just assume the flag is on the right side
         if (!b.getPiece(row, col).getOurSide() &&
             !b.getPiece(row, col).getRank().equals(Rank.Empty) && 
             b.getPiece(row, col).getcBeFlag()) {
            enemyFlag = new Position(row, col);
         }
         else {
            // this HQ is captured by us, or it is empty now,
            // the other HQ must have the flag
            row = enemyHQL.getRow();
            col = enemyHQL.getCol();
            enemyFlag = new Position(row, col);
         }
      }
   }