示例#1
0
        /// <summary>Draws playing field</summary>
        private static void DrawScreen()
        {
            // initialize screen
            // VIEW PRINT (?)
            Console.ForegroundColor = (ConsoleColor)colorTable[0];
            Console.BackgroundColor = (ConsoleColor)colorTable[3];
            Console.Clear();

            // Print title & message
            Center(1, "Nibbles!");
            Center(11, "Initializing Playing Field...");

            // Initialize arena array
            for (int row = 1; row <= 50; row++)
            {
                for (int col = 1; col <= 80; col++)
                {
                    arena[row, col] = new ArenaType {
                        realRow = (row + 1) / 2, sister = (row % 2) * 2 - 1
                    }
                }
            }
            ;
        }
示例#2
0
        /// <summary>Draws playing field</summary>
        private static void DrawScreen()
        {
            // initialize screen
            // VIEW PRINT (?)
            Console.ForegroundColor = (ConsoleColor)colorTable[0];
            Console.BackgroundColor = (ConsoleColor)colorTable[3];
            Console.Clear();

            // Print title & message
            Center(1, "Nibbles!");
            Center(11, "Initializing Playing Field...");

            // Initialize arena array
            for (int row = 1; row <= 50; row++)
                for (int col = 1; col <= 80; col++)
                    arena[row, col] = new ArenaType { realRow = (row + 1) / 2, sister = (row % 2) * 2 - 1 };
        }