protected virtual IList <GameEvent> ReceiveGamePhaseEvent(GameEvent arg) { GamePhaseEvent evt = arg as GamePhaseEvent ?? throw ReceiverArgumentMismatch(nameof(arg), arg.GetType(), MethodBase.GetCurrentMethod().Name, typeof(GamePhaseEvent)); return(null); }
public void InitServices() { this.services = new ServiceCollection() .AddLogging() .AddSingleton <IDiceUtility, MockDice>() // Always rolls sixes on d6; always rolls 99 on d100 .BuildServiceProvider(); this.weapon = new BeamBatterySystem(3, "(All arcs)"); this.weaponAllocation = new GameUnitFireAllocation(); this.distanceGraph = new FormationDistanceGraph(); this.totalDummy = new TestDummyActor(this.services); this.phaseDummy = new TestDummyPhaseActor(this.services); this.engine = new EventHandlingEngine(); this.phaseEvent = new FiringPhaseEvent(1, 1, this.distanceGraph) as GamePhaseEvent; this.attackEvent = new WeaponAttackEvent(new TargetingData(), new AttackData(this.weapon, this.weaponAllocation)); }