Table of Contents

Class TeamScoreTable

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

Assumes a set pool of points that can be distributed amongst any known number of teams, and a neutral team.

public class TeamScoreTable
Inheritance
TeamScoreTable
Inherited Members

Constructors

TeamScoreTable(IReadOnlyList<Team>, double)

public TeamScoreTable(IReadOnlyList<Team> teams, double neutralScore)

Parameters

teams IReadOnlyList<Team>
neutralScore double

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

MaxScore

public double MaxScore { get; }

Property Value

double

Teams

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

Property Value

IReadOnlyList<Team>

Methods

DecrementPoints(Team?, double, bool)

Decrease the amount of points for a team by amount.

public double DecrementPoints(Team? team, double amount, bool toNeutral)

Parameters

team Team
amount double
toNeutral bool

Returns

double

Exceptions

ArgumentOutOfRangeException

Unknown team.

Distribute(params double[])

Distributes the total score given a set ration (where the first index is the neutral team).

public void Distribute(params double[] ratio)

Parameters

ratio double[]

DistributeUniformly()

Distributes the total score over all teams (except the netural team).

public void DistributeUniformly()

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.

MaximizeTeam(Team?)

Distributes the entire score to the neutral team.

public void MaximizeTeam(Team? team)

Parameters

team Team

MinimizeTeam(Team?)

Distributes the entire score to the neutral team.

public void MinimizeTeam(Team? team)

Parameters

team Team

NeutralizeScores()

Distributes the entire score to the neutral team.

public void NeutralizeScores()

ToGraph(bool)

Creates a graph for visualizing the different scores.

public string ToGraph(bool scaleToMaximum = false)

Parameters

scaleToMaximum bool

Returns

string

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.