示例#1
0
 public function __construct(SudokuGrid $sudoku = null, $blockSize = 3)
 {
     $this->blockSize = $blockSize;
     $this->initLine($blockSize);
     if ($sudoku != null) {
         $cellList = $sudoku->getAll(true);
         foreach ($cellList as $cell) {
             $this->lineList[$cell->getLine()]->getCell($cell->getColumn())->setValue($cell->getValue());
             $this->lineList[$cell->getLine()]->getCell($cell->getColumn())->setValue($cell->getStatus());
         }
     }
 }