Exemple #1
0
    public BattlePreparation(FactionArmies attacker, FactionArmies defender, BattleSite site)
    {
        ScoutingEffects   attackerScout     = new ScoutingEffects(attacker, defender);
        ScoutingEffects   defenderScout     = new ScoutingEffects(defender, attacker);
        SpyingEffects     attackerSpies     = new SpyingEffects(attacker);
        SpyingEffects     defenderSpies     = new SpyingEffects(defender);
        RaidingEffects    raiding           = new RaidingEffects(attacker, site);
        LogisticalEffects attackerLogistics = new LogisticalEffects(attacker);
        LogisticalEffects defenderLogistics = new LogisticalEffects(defender);

        Attacker = new BattleSidePreparation(attackerScout, raiding, attackerLogistics, attackerSpies);
        Defender = new BattleSidePreparation(defenderScout, RaidingEffects.Defender, defenderLogistics, defenderSpies);
    }
    private BattleStateForces GetInitialArmyInBattle(Army army, BattleSidePreparation preBattle, BattleSite site)
    {
        IEnumerable <SquadBattleState> squads = army.Squadrons.Select(item => GetInitialSquadInBattle(item, army, preBattle, site)).ToArray();

        return(new BattleStateForces(army, squads));
    }
 private SquadBattleState GetInitialSquadInBattle(Squad item, Army army, BattleSidePreparation preBattle, BattleSite site)
 {
     throw new NotImplementedException();
 }
 private IEnumerable <BattleStateForces> GetInitialBattleArmies(FactionArmies forces, BattleSidePreparation preBattle, BattleSite site)
 {
     foreach (Army army in forces.Armies)
     {
         yield return(GetInitialArmyInBattle(army, preBattle, site));
     }
 }