double bestDmg = 0, dmg;
double bestDmg = 0, dmg, coll_damage, self_damage;
    PhysicalOption getBestPhysicalAttack(Entity from, Entity to, IGame game) {        double bestDmg = 0, dmg;        int damage;        int bestType = PhysicalOption.PUNCH_LEFT;        // Infantry can't conduct physical attacks.        if (from instanceof Infantry) {            return null;        }        ToHitData odds = PunchAttackAction.toHit(game, from.getId(), to, PunchAttackAction.LEFT);        if (odds.getValue() != ToHitData.IMPOSSIBLE) {            damage = PunchAttackAction.getDamageFor(from, PunchAttackAction.LEFT);            bestDmg = Compute.oddsAbove(odds.getValue()) / 100.0 * damage;        }        odds = PunchAttackAction.toHit(game, from.getId(), to, PunchAttackAction.RIGHT);        if (odds.getValue() != ToHitData.IMPOSSIBLE) {            damage = PunchAttackAction.getDamageFor(from, PunchAttackAction.RIGHT);            dmg = Compute.oddsAbove(odds.getValue()) / 100.0 * damage;            if (dmg > 0 && bestDmg > 0) {                bestType = PhysicalOption.PUNCH_BOTH;                bestDmg += dmg;            } else {                bestType = PhysicalOption.PUNCH_RIGHT;                bestDmg = dmg;            }        }        odds = KickAttackAction.toHit(game, from.getId(), to, KickAttackAction.LEFT);        if (odds.getValue() != ToHitData.IMPOSSIBLE) {            damage = KickAttackAction.getDamageFor(from, KickAttackAction.LEFT);            dmg = Compute.oddsAbove(odds.getValue()) / 100.0 * damage;            if (dmg > bestDmg) {                bestType = PhysicalOption.KICK_LEFT;                bestDmg = dmg;            }        }        odds = KickAttackAction.toHit(game, from.getId(), to, KickAttackAction.RIGHT);        if (odds.getValue() != ToHitData.IMPOSSIBLE) {            damage = KickAttackAction.getDamageFor(from, KickAttackAction.RIGHT);            dmg = Compute.oddsAbove(odds.getValue()) / 100.0 * damage;            if (dmg > bestDmg) {                bestType = PhysicalOption.KICK_RIGHT;                bestDmg = dmg;            }        }        // Infantry in the open suffer double damage.        if (to instanceof Infantry) {            IHex e_hex = game.getBoard().getHex(to.getPosition());            if (!e_hex.containsTerrain(Terrains.WOODS) && !e_hex.containsTerrain(Terrains.BUILDING)) {                bestDmg *= 2;            }        }        if (bestDmg > 0) {            return new PhysicalOption(from, to, bestDmg, bestType);        }        return null;    }