Untitled

mail@pastecode.io avatarunknown
plain_text
9 days ago
3.2 kB
6
Indexable
Never
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Alquerque0._2
{
    internal class Board
    {
        char[,] chars = {
                {   ' ',' ',' ','A',' ','B',' ','C','D','E',' ','F',' ','G','H','I',' ','J',' ','K',' '},
                {   ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' '},
                {   '1',' ',' ',' ',' ',' ',' ',' ','0','-','-','0','-','-','0',' ',' ',' ',' ',' ',' '},
                {   ' ',' ',' ',' ',' ',' ',' ',' ',' ','\\',' ','|',' ','/',' ',' ',' ',' ',' ',' ',' '},
                {   '2',' ',' ',' ',' ',' ',' ',' ',' ','0','-','0','-','0',' ',' ',' ',' ',' ',' ',' '},
                {   ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','\\','|','/',' ',' ',' ',' ',' ',' ',' ',' '},
                {   '3',' ',' ','E',' ',' ',' ','0','-','0','-','0','-','0','-','0',' ',' ',' ','E',' '},
                {   ' ',' ',' ','|','\\',' ',' ','|','\\','|','/','|','\\','|','/','|',' ',' ','/','|',' '},
                {   '4',' ',' ','|',' ','E',' ','0','-','0','-','0','-','0','-','0',' ','E',' ','|',' '},
                {   ' ',' ',' ','|',' ','|','\\','|','/','|','\\','|','/','|','\\','|','/','|',' ','|',' '},
                {   '5',' ',' ','E','-','E','-','E','-','E','-','E','-','E','-','E','-','E','-','E',' '},
                {   ' ',' ',' ','|',' ','|','/','|','\\','|','/','|','\\','|','/','|','\\','|',' ','|',' '},
                {   '6',' ',' ','|',' ','E',' ','*','-','*','-','*','-','*','-','*',' ','E',' ','|',' '},
                {   ' ',' ',' ','|','/',' ',' ','|','/','|','\\','|','/','|','\\','|',' ',' ','\\','|',' '},
                {   '7',' ',' ','E',' ',' ',' ','*','-','*','-','*','-','*','-','*',' ',' ',' ','E',' '},
                {   ' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','/','|','\\',' ',' ',' ',' ',' ',' ',' ',' '},
                {   '8',' ',' ',' ',' ',' ',' ',' ',' ','*','-','*','-','*',' ',' ',' ',' ',' ',' ',' '},
                {   ' ',' ',' ',' ',' ',' ',' ',' ',' ','/',' ','|',' ','\\',' ',' ',' ',' ',' ',' ',' '},
                {   '9',' ',' ',' ',' ',' ',' ',' ','*','-','-','*','-','-','*',' ',' ',' ',' ',' ',' '},
         };

        public void PrintBoard()
        {
            for (int row = 0; row < chars.GetLength(0); row++)
            {
                for (int col = 0; col < chars.GetLength(1); col++)
                {
                    char currentChar = chars[row, col];

                    if (currentChar == '*')
                    {
                        Console.ForegroundColor = ConsoleColor.Red;
                    }
                    else if (currentChar == '0')
                    {
                        Console.ForegroundColor = ConsoleColor.Blue;
                    }
                    else
                    {
                        Console.ResetColor();
                    }
                    Console.Write(chars[row, col]);
                    Console.Write(" ");
                }
                Console.WriteLine();
            }
        }
    }

}