Exemplo n.º 1
0
 private void CreateNextColumn(Cell cell)
 {
     if (cell.GetNextCell().GetAssociatedColumn() == null)
     {
         Column column = new Column(GetColumnNumber() + 1, cell.GetNextCell());
     }
 }
Exemplo n.º 2
0
 private void WhetherToPlaceNewBlock(Cell cell)
 {
     if (cell.GetNextCell().GetNextCell().GetNextCell().GetAssociatedBlock() == null || blockNumber != 8)
     {
         WhereToPlaceNewBlock(cell);
     }
 }
Exemplo n.º 3
0
        private void RecruitMembers(Cell cell)
        {
            Cell currentCell = cell;

            for (int i = 0; i < 9; i++)
            {
                if (i == 3 || i == 6)
                {
                    currentCell = currentCell.GetNextCell().GetNextCell().GetNextCell().GetNextCell().GetNextCell().GetNextCell();
                }
                AddMember(currentCell);
                currentCell = currentCell.GetNextCell();
            }

            WhetherToPlaceNewBlock(cell);
        }
Exemplo n.º 4
0
        private void NewLineOfBlocks(Cell cell)
        {
            Cell currentCell = cell;

            for (int i = 0; i < 21; i++)
            {
                currentCell = currentCell.GetNextCell();
            }
            Block block = new Block(GetBlockNumber() + 1, currentCell);
        }
Exemplo n.º 5
0
 private void WhereToPlaceNewBlock(Cell cell)
 {
     if (blockNumber != 2 && blockNumber != 5)
     {
         Block block = new Block(GetBlockNumber() + 1, cell.GetNextCell().GetNextCell().GetNextCell());
     }
     else
     {
         NewLineOfBlocks(cell);
     }
 }
Exemplo n.º 6
0
        private void RecruitMembers(Cell cell)
        {
            Cell currentCell = cell;

            for (int i = 0; i < 9; i++)
            {
                AddMember(currentCell);
                currentCell = currentCell.GetNextCell();
            }

            CreateNextRow(currentCell);
        }
Exemplo n.º 7
0
        private Cell FindStartCell()
        {
            Cell currentCell = this;

            for (int i = 0; i < 81; i++)
            {
                if (currentCell.cellNumber != 0)
                {
                    currentCell = currentCell.GetNextCell();
                }
            }
            return(currentCell);
        }
Exemplo n.º 8
0
        private void ViewSheet(Cell startCell)
        {
            Console.Write("\n\n");
            Cell currentCell = startCell;

            for (int i = 0; i < 81; i++)
            {
                Formatting(i);
                Console.Write(currentCell.GetValue() + " ");
                currentCell = currentCell.GetNextCell();
            }
            Console.Write("\n\n");
        }
Exemplo n.º 9
0
        private void RecruitMembers(Cell cell)
        {
            Cell currentCell = cell;

            for (int i = 0; i < 73; i++)
            //73 because the last row doesn't have to be
            //completely iterated, so 72 is the last.
            {
                if (i % 9 == 0)
                {
                    AddMember(currentCell);
                }
                currentCell = currentCell.GetNextCell();
            }

            CreateNextColumn(cell);
        }