Class OfferOddsModel

Namespace
SurvivorsMaker.Editor
Assembly
SurvivorsMaker.Editor.dll

Columns the Offer Odds table can sort by: Id, Kind, Tier, ExpectedFirst, or a progress column (≥ 0).

public static class OfferOddsModel
Inheritance
OfferOddsModel
Inherited Members

Fields

SortFirst

public const int SortFirst = -4

Field Value

int

SortId

public const int SortId = -1

Field Value

int

SortKind

public const int SortKind = -2

Field Value

int

SortNotObserved

public const int SortNotObserved = -5

Field Value

int

SortTier

public const int SortTier = -3

Field Value

int

Methods

Filter(List<OfferOddsRow>, string, OfferKind)

Rows whose id contains the filter (case-insensitive) and whose kind matches (None = all).

public static List<OfferOddsRow> Filter(List<OfferOddsRow> rows, string text, OfferKind kind)

Parameters

rows List<OfferOddsRow>
text string
kind OfferKind

Returns

List<OfferOddsRow>

MaxChance(List<OfferOddsRow>)

Highest chance in the table (for heat coloring), at least a small positive value.

public static float MaxChance(List<OfferOddsRow> rows)

Parameters

rows List<OfferOddsRow>

Returns

float

Rows(OfferOddsReport, OfferOddsReport, Func<OfferKind, string, int>)

public static List<OfferOddsRow> Rows(OfferOddsReport report, OfferOddsReport baseline, Func<OfferKind, string, int> tierOf = null)

Parameters

report OfferOddsReport
baseline OfferOddsReport
tierOf Func<OfferKind, string, int>

Returns

List<OfferOddsRow>

Sort(List<OfferOddsRow>, int, bool)

Stable sort: by the column, then id. Never-appearing (−1) first-appearance values sort last.

public static void Sort(List<OfferOddsRow> rows, int column, bool descending)

Parameters

rows List<OfferOddsRow>
column int
descending bool