コード例 #1
0
 private void LineAcross()   // aid in number drawing - draw line horizantally across width of number
 {
     for (int i = 0; i < ScoreNumberWidth; ++i)
     {
         Write(numChar1);
         screenSquares[CursorTop, CursorLeft - 1] = new ScoreNumbers.SquareInfo((IsLeftNumber() ? 2 : 3), numChar1);
     }
 }
コード例 #2
0
 private void LineDown(int num)  // aid in number drawing - draw line down for specified height
 {
     for (int i = 0; i < num; ++i)
     {
         Write(numChar2);
         screenSquares[CursorTop, CursorLeft - 1] = new ScoreNumbers.SquareInfo((IsLeftNumber() ? 2 : 3), numChar2);
         ++CursorTop;
         --CursorLeft;
     }
 }
コード例 #3
0
        public static void DrawCenterLine()    // draws the halfway line in the center of the screen
        {
            MakeTextVisible();
            SetCursorPosition(widthOfConsole / 2, 0);   // go to middle of screen to draw center line
            for (int i = 0; i < heightOfConsole; ++i)   // draw center line
            {
                Write("|");
                screenSquares[i, widthOfConsole / 2] = new ScoreNumbers.SquareInfo(1, "|");
                if (i < (heightOfConsole - 1))
                {
                    ++CursorTop;
                    --CursorLeft;
                }
            }

            MakeTextInvisible();
        }