Bacterium.Game.InitializeCells C# (CSharp) Method

InitializeCells() public method

public InitializeCells ( ) : void
return void
        public void InitializeCells()
        {
            //const int StartX = -370, StartY = -220, ColumnStepX = 92, ColumnStepY = 53, RowStepY = 108;
            const int StartX = 79, StartY = 119, ColumnStepX = 46, ColumnStepY = 27, RowStepY = 54;
            int RowStartY, i, j;
            for (i = 0; i < 9; i++)
            {
                RowStartY = StartY + RowStepY * i;
                List<Cell> CellList = new List<Cell>();
                for (j = 0; j < 9; j++)
                    CellList.Add(new Cell(StartX + ColumnStepX * j, RowStartY - ColumnStepY * j, true));
                _cells.Add(CellList);
            }
            int max = 0;
            for (i = 5; i < 9; i++, max++)
                for (j = 0; j <= max; j++)
                    _cells[i][j].Enabled = false;
            max = 5;
            for (i = 0; i < 4; i++, max++)
                for (j = max; j < 9; j++)
                    _cells[i][j].Enabled = false;
        }