Class SingleLeaderContest
public class SingleLeaderContest
- Inheritance
-
SingleLeaderContest
- Inherited Members
Constructors
SingleLeaderContest(int)
public SingleLeaderContest(int maxPossiblePoints)
Parameters
maxPossiblePointsint
SingleLeaderContest(Team, int)
public SingleLeaderContest(Team startingWinner, int maxPossiblePoints)
Parameters
Properties
IsWon
Whether the competition is won by the Leader. The value will become true when the Leader manages to reach max number of points possible. It will then remain true until the LeaderPoints is reduced to zero by other competing teams.
public bool IsWon { get; }
Property Value
Leader
The Team currently leading the contest.
public Team Leader { get; }
Property Value
LeaderPoints
The current points the Leader of the contest has.
public int LeaderPoints { get; }
Property Value
MaxPossiblePoints
public int MaxPossiblePoints { get; }
Property Value
Methods
AwardPoints(Team, int)
Award points to specific team. All teams compete to be the only team reaching the max amount of points possible. If a certain team is currently leading, awarding this team poinst will increase LeaderPoints, and all points awarded to other teams will reduce LeaderPoints until it reaches zero, thus allowing for a new leader to take charge.
public void AwardPoints(Team team, int points)
Parameters
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Events
OnPointsChanged
Invoked when the competition is one by a particular team.
public event SingleLeaderContest.PointsChanged? OnPointsChanged
Event Type
OnRestarted
Invoked when the competition is restarted after being won, i.e. when a particular team is awarded points causing LeaderPoints reach zero and IsWon is already true.
public event SingleLeaderContest.Restarted? OnRestarted
Event Type
OnWon
Invoked when the competition is one by a particular team.
public event SingleLeaderContest.Won? OnWon