public Stat this[DifficultyLevel level, CoreCZ.Side side] { get { return other[index(level, side)]; } }
public Stat this[CoreCZ.Side side] { get { Stat s1 = other[index(DifficultyLevel.EASY, side)]; Stat s2 = other[index(DifficultyLevel.HARD, side)]; return new Stat(s1.Count + s2.Count, s1.Victory + s2.Victory, s1.TurnsAmount + s2.TurnsAmount); } }
public void AddGame(bool win, DifficultyLevel level, CoreCZ.Side side, int turnsAmount) { overall = increment(overall, win, turnsAmount); other[index(level, side)] = increment(other[index(level, side)], win, turnsAmount); }
private string key(DifficultyLevel level, CoreCZ.Side side) { string off = side == CoreCZ.Side.Cross ? "Cross" : "Zero"; return off + (level == DifficultyLevel.EASY ? "Easy" : "Hard"); }
private int index(DifficultyLevel level, CoreCZ.Side side) { int off = side == CoreCZ.Side.Cross ? 0 : 1; return off + (level == DifficultyLevel.EASY ? 0 : 2); }