public PlayerViewModel(Player player, Notifier notifier) { this.player = player; notifier.SubscribeToViewModel(this); Icons icons = new Icons(); switch (player.Role) { case "Dispatcher": pawn = icons["pawnPurple"]; break; case "Medic": pawn = icons["pawnOrange"]; break; case "Scientist": pawn = icons["pawnWhite"]; break; case "Quarantine Specialist": pawn = icons["pawnDarkGreen"]; break; case "Researcher": pawn = icons["pawnBrown"]; break; case "Operations Expert": pawn = icons["pawnGreen"]; break; } }
public PreventionEventArgs(Player player, Disease disease, Node node) { Player = player; Disease = disease; Node = node; }
public TreatedEventArgs(NodeDiseaseCounter nodeDiseaseCounter, Player treater, int value) { NodeDiseaseCounter = nodeDiseaseCounter; Treater = treater; Value = value; }
public void SubscribeToMover(Player mover) { mover.Moved += moverMoved; }
internal void ResetDrawManager(Player player) { this.player = player; count = 2; }
public Hand(Player player) { owner = player; cards = new List<Card>(); DiscardManager = new DiscardManager(this); }
internal void Treatment(int rate, Player treater) { int j = 0; for (int i = 0; i < rate; i++) { if (Count > 0) { Count--; j++; } } if(j > 0) if (Treated != null) Treated(this, new TreatedEventArgs(this, treater, j)); }
internal void SetPlayer(Player player, IEnumerable<Player> players, IEnumerable<Node> nodes, IEnumerable<NodeDiseaseCounter> nodeDiseaseCounters, ResearchStationCounter researchStationCounter, IEnumerable<Disease> diseases) { driveManager = new DriveManager(player); CanDrive = driveManager.CanDrive; Drive = driveManager.Drive; directFlightManager = new DirectFlightManager(player); CanDirectFlight = directFlightManager.CanDirectFlight; DirectFlight = directFlightManager.DirectFlight; charterFlightManager = new CharterFlightManager(player, nodes); CanCharterFlight = charterFlightManager.CanCharterFlight; CharterFlight = charterFlightManager.CharterFlight; shuttleFlightManager = new ShuttleFlightManager(player, nodes); CanShuttleFlight = shuttleFlightManager.CanShuttleFlight; ShuttleFlight = shuttleFlightManager.ShuttleFlight; researchStationConstructionManager = new ResearchStationConstructionManager(player, researchStationCounter, nodes); CanBuildResearchStation = researchStationConstructionManager.CanConstructResearchStation; BuildResearchStation = researchStationConstructionManager.ConstructResearchStation; treatDiseaseManager = new TreatDiseaseManager(player, nodeDiseaseCounters); CanTreatDisease = treatDiseaseManager.CanTreat; TreatDisease = treatDiseaseManager.Treat; shareKnowledgeManager = new ShareKnowledgeManager(player, players); CanShareKnowledge = shareKnowledgeManager.CanShareKnowledge; ShareKnowledge = shareKnowledgeManager.ShareKnowledge; discoverCureManager = new DiscoverCureManager(player, diseases); CanDiscoverCure = discoverCureManager.CanDiscoverCure; DiscoverCure = discoverCureManager.DiscoverCure; dispatchManager = new DispatchManager(player, players); CanDispatch = dispatchManager.CanDispatch; Dispatch = dispatchManager.Dispatch; operationsRelocationManager = new OperationsRelocationManager(player, nodes); CanRelocate = operationsRelocationManager.CanRelocate; Relocate = operationsRelocationManager.Relocate; }