Beispiel #1
0
        private void printGrid()
        {
            Dictionary <string, int>      _ops        = _Grid.GetOperatorsCount();
            Dictionary <CoOrdinate, Card> cardsWithCo = _Grid.GetCards();

            Console.WriteLine("Score ----  " + "Margin " + MarginalScore + "  " + FirstPlayer.Name + " => " + FirstPlayer.Score.Value + "/" + FirstPlayer.LambdaCards +
                              " ### " + SecondPlayer.Name + " => " + SecondPlayer.Score.Value + "/" + SecondPlayer.LambdaCards);
            wl("");
            w("CARDS --- ");
            foreach (var element in _ops)
            {
                w(element.Key + "=>" + element.Value + " ### ");
            }

            wl("\n");
            for (int i = 1; i <= _Grid.Size; i++)
            {
                for (int j = 1; j <= _Grid.Size; j++)
                {
                    Console.Write("" + i + "," + j + "=>");
                    CoOrdinate coo = new CoOrdinate(i, j);
                    if (cardsWithCo.ContainsKey(coo))
                    {
                        Console.Write(cardsWithCo[coo].Point.Value + "       ");
                    }
                    else
                    {
                        Console.Write("blank    ");
                    }
                }

                Console.WriteLine();
            }
        }
Beispiel #2
0
 public Card PopCardAt(CoOrdinate co)
 {
     if (Cards.ContainsKey(co))
     {
         var Return = Cards[co];
         DeleteCardAt(co);
         return(Return);
     }
     return(default);