コード例 #1
0
        public Board(IHexValuesGenerator _valuesGenerator)
        {
            Cells             = new Cell[TOTAL_COLS, TOTAL_ROWS];
            m_valuesGenerator = _valuesGenerator;

            for (var row = 0; row < TOTAL_ROWS; ++row)
            {
                for (var col = 0; col < TOTAL_COLS; ++col)
                {
                    Cells[col, row] = new Cell(col, row);
                }
            }

            GenerateTriplets();

            FillEmptyCells();
        }
コード例 #2
0
        public Board(IHexValuesGenerator _valuesGenerator)
        {
            Cells = new Cell[TOTAL_COLS, TOTAL_ROWS];
            m_valuesGenerator = _valuesGenerator;

            for (var row = 0; row < TOTAL_ROWS; ++row)
            {
                for (var col = 0; col < TOTAL_COLS; ++col)
                {
                    Cells[col, row] = new Cell(col, row);
                }
            }

            GenerateTriplets();

            FillEmptyCells();
        }
コード例 #3
0
 public Game(IHexValuesGenerator _hexValuesGenerator, IPlayer _player)
 {
     Player = _player;
     Board = new Board(_hexValuesGenerator);
 }
コード例 #4
0
 public Game(IHexValuesGenerator _hexValuesGenerator, IPlayer _player)
 {
     Player = _player;
     Board  = new Board(_hexValuesGenerator);
 }