public int GetNextCupIndex(int currcentCupIndex) { var totalCups = Cups.Count(); currcentCupIndex++; if (currcentCupIndex >= totalCups) { currcentCupIndex -= totalCups; } return(currcentCupIndex); }
protected void PrintCups() { var strings = new List <string>(); for (int i = 0; i < Cups.Count(); i++) { var cup = CurrcentCupIndex == i ? $"({Cups[i]})" : $"{Cups[i]}"; strings.Add(cup); } Console.WriteLine($"cups: {String.Join(" ", strings)}"); }
private CupVM Oposite(CupVM cup) { var count = Cups.Count(); return(Cups.Single(c => c.Index == (count - 2) - cup.Index)); }