Example #1
0
        public void ScheduleNextEnergyAllocation(int shipId, EnergyAllocationDeclaration energyAllocationDeclarationChange)
        {
            SimulationTurn turnToModify;

            if (SimulationTimeStamp.CanScheduleEnergyAllocationOnThisTurn())
            {
                turnToModify = GetOrCreateTurn(SimulationTimeStamp.TurnNumber);
            }
            else
            {
                turnToModify = GetOrCreateTurn(SimulationTimeStamp.TurnNumber + 1);
            }

            turnToModify.EnergyAllocations[shipId] = energyAllocationDeclarationChange;
        }
Example #2
0
 //(1E1) ENERGY ALLOCATION
 //See the rules on this subject (1D). In summary,
 //count the amount of energy your ship has, and obtain
 //energy tokens for each point. (During the first turn of
 //a scenario, the ship has additional energy tokens
 //equal to the number of batteries on the ship, representing power stored in the batteries.)
 //Pick and pay for your baseline speed (2B1b) secretly and simultaneously with other players.
 //Pay for any weapon pre-loading, such as Photon
 //Torpedoes (4C2).
 //Pay for any Shield Regeneration (3C7) at the rate
 //of two energy tokens for each shield box repaired
 private void ExecuteEnergyAllocation(Ship ship, EnergyAllocationDeclaration allocationDeclaration)
 {
     ship.ExecuteDeclaredEnergyAllocation(allocationDeclaration);
 }