コード例 #1
0
ファイル: Score.cs プロジェクト: whitemanthedj/BridgeBackEnd
        public void PrintScoreCard()
        {
            int start = (we.AboveRecord().Count > they.AboveRecord().Count ? we.AboveRecord().Count : they.AboveRecord().Count);

            Console.WriteLine("WE   | THEY");
            Console.WriteLine("     |     ");

            for (int i = start - 1; i >= 0; i--)
            {
                string weString   = (i < we.AboveRecord().Count ? we.AboveRecord()[i] : "");
                string theyString = (i < they.AboveRecord().Count ? they.AboveRecord()[i] : "");

                Console.WriteLine("{0, -5}|{1, -5}", weString, theyString);
            }


            int below = (we.BelowRecord().Count > they.BelowRecord().Count ? we.BelowRecord().Count : they.BelowRecord().Count);


            for (int i = 0; i < below; i++)
            {
                string weString   = (i < we.BelowRecord().Count ? we.BelowRecord()[i] : "    ");
                string theyString = (i < they.BelowRecord().Count ? they.BelowRecord()[i] : "");

                Console.WriteLine("{0, -5}|{1, -5}", weString, theyString);
            }
        }