예제 #1
0
 private void CreateNextColumn(Cell cell)
 {
     if (cell.GetNextCell().GetAssociatedColumn() == null)
     {
         Column column = new Column(GetColumnNumber() + 1, cell.GetNextCell());
     }
 }
예제 #2
0
 private void WhetherToPlaceNewBlock(Cell cell)
 {
     if (cell.GetNextCell().GetNextCell().GetNextCell().GetAssociatedBlock() == null || blockNumber != 8)
     {
         WhereToPlaceNewBlock(cell);
     }
 }
예제 #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);
        }
예제 #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);
        }
예제 #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);
     }
 }
예제 #6
0
        private void RecruitMembers(Cell cell)
        {
            Cell currentCell = cell;

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

            CreateNextRow(currentCell);
        }
예제 #7
0
        private Cell FindStartCell()
        {
            Cell currentCell = this;

            for (int i = 0; i < 81; i++)
            {
                if (currentCell.cellNumber != 0)
                {
                    currentCell = currentCell.GetNextCell();
                }
            }
            return(currentCell);
        }
예제 #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");
        }
예제 #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);
        }