Table of Contents

Class SingleLeaderContest

Namespace
Uncreated.Warfare.Layouts.Flags
Assembly
Uncreated.Warfare.dll
public class SingleLeaderContest
Inheritance
SingleLeaderContest
Inherited Members

Constructors

SingleLeaderContest(int)

public SingleLeaderContest(int maxPossiblePoints)

Parameters

maxPossiblePoints int

SingleLeaderContest(Team, int)

public SingleLeaderContest(Team startingWinner, int maxPossiblePoints)

Parameters

startingWinner Team
maxPossiblePoints int

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

bool

Leader

The Team currently leading the contest.

public Team Leader { get; }

Property Value

Team

LeaderPoints

The current points the Leader of the contest has.

public int LeaderPoints { get; }

Property Value

int

MaxPossiblePoints

public int MaxPossiblePoints { get; }

Property Value

int

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

team Team
points int

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

SingleLeaderContest.PointsChanged

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

SingleLeaderContest.Restarted

OnWon

Invoked when the competition is one by a particular team.

public event SingleLeaderContest.Won? OnWon

Event Type

SingleLeaderContest.Won