Example #1
0
            public int GetNextCupIndex(int currcentCupIndex)
            {
                var totalCups = Cups.Count();

                currcentCupIndex++;
                if (currcentCupIndex >= totalCups)
                {
                    currcentCupIndex -= totalCups;
                }
                return(currcentCupIndex);
            }
Example #2
0
            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)}");
            }
Example #3
0
        private CupVM Oposite(CupVM cup)
        {
            var count = Cups.Count();

            return(Cups.Single(c => c.Index == (count - 2) - cup.Index));
        }