Untitled

 avatar
unknown
plain_text
3 years ago
1.0 kB
4
Indexable
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace OwareV2
{
    internal class Table
    {
        private String _p1, _p2;
        private int[,] _table;
        private int _seed = 4;
        public Table(String player1, String player2)
        {
            this._p1 = player1;
            this._p2 = player2;
            _table = new int[2, 6];
        }

        public void display()
        {
            for (int i = 0; i < 2; i++)
            {
                for (int j = 0; j < 6; j++)
                {
                    _table[i, j] = _seed;
                    Console.Write(" "+_table[i,j]+" |");
                }
                Console.WriteLine();
            }
        }

        public void showtable()
        {
            Console.WriteLine("Player | A | B | C | D | E | F |");
            Console.WriteLine(_p1 + "|\n" + _p2 + "|");
            display();
        }
    }
}
Editor is loading...