Skip to content

Costs

namespace Griff.Modules.Strategy;
public static class Costs

Hotkey letters, and resources read and written the way Items reads every genre’s items: “150 Gold, 50 Wood” (or “Gold 150”).

public static IReadOnlyList<string> Letters { get; }

The keys a unit’s or building’s Hotkey can be: the letters A to Z.

public static string Describe(string? cost)

“150 Gold, 50 Wood”: the way a price reads (see Describe).

public static string Format(IEnumerable<KeyValuePair<string, int>> amounts)

“Gold 150, Wood 50”.

public static Dictionary<string, int> Parse(string? text)

The amounts in text, by resource; empty for nothing (or nothing readable). See Totals.