Table of Contents

Class TeamCountTable

Namespace
Uncreated.Warfare.Teams
Assembly
Uncreated.Warfare.dll

Assumes an unlimited pool of points that can be given to any known number of teams, and a neutral team.

public class TeamCountTable
Inheritance
TeamCountTable
Inherited Members

Constructors

TeamCountTable(IReadOnlyList<Team>)

public TeamCountTable(IReadOnlyList<Team> teams)

Parameters

teams IReadOnlyList<Team>

Properties

this[Team?]

Get the score for a team, or the neutral score if team is null.

public double this[Team? team] { get; }

Parameters

team Team

Property Value

double

Teams

public IReadOnlyList<Team> Teams { get; set; }

Property Value

IReadOnlyList<Team>

Methods

CalcualateMaxScore(bool)

Calculate highest score of all teams. This may include the neutral team if ignoreNeutral is not true.

public double CalcualateMaxScore(bool ignoreNeutral)

Parameters

ignoreNeutral bool

Returns

double

CalcualateMaxScore(bool, out Team?)

Calculate the team with the highest score. This may be the neutral team if ignoreNeutral is not true, in which case maximumTeam will be null.

public double CalcualateMaxScore(bool ignoreNeutral, out Team? maximumTeam)

Parameters

ignoreNeutral bool
maximumTeam Team

Returns

double

CalcualateMinScore(bool)

Calculate lowest score of all teams. This may include the neutral team if ignoreNeutral is not true.

public double CalcualateMinScore(bool ignoreNeutral)

Parameters

ignoreNeutral bool

Returns

double

CalcualateMinScore(bool, out Team?)

Calculate the team with the lowest score. This may be the neutral team if ignoreNeutral is not true, in which case minimumTeam will be null.

public double CalcualateMinScore(bool ignoreNeutral, out Team? minimumTeam)

Parameters

ignoreNeutral bool
minimumTeam Team

Returns

double

CalculateAverageScore(bool)

Calculate the mean of all teams' scores. This may include the neutral team if ignoreNeutral is not true.

public double CalculateAverageScore(bool ignoreNeutral)

Parameters

ignoreNeutral bool

Returns

double

CalculateTotalScore(bool)

Calculate the sum of all teams' scores. This may include the neutral team if ignoreNeutral is not true.

public double CalculateTotalScore(bool ignoreNeutral)

Parameters

ignoreNeutral bool

Returns

double

ClearScores()

Set all scores to zero.

public void ClearScores()

GetRelativeScore(bool, Team?)

Get the score for a team relative to the total score of all teams.

public double GetRelativeScore(bool ignoreNeutral, Team? team)

Parameters

ignoreNeutral bool
team Team

Returns

double

IncrementPoints(Team?, double)

Increase the amount of points for a team by amount.

public double IncrementPoints(Team? team, double amount)

Parameters

team Team
amount double

Returns

double

Exceptions

ArgumentOutOfRangeException

Unknown team.

SetAllScores(double, bool)

Set all scores to a value.

public void SetAllScores(double value, bool ignoreNeutral)

Parameters

value double
ignoreNeutral bool

ToGraph()

Creates a graph for visualizing the different scores.

public string ToGraph()

Returns

string