Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Board* Board::search(void) {
- for (int x=0; x<9; x++)
- for (int y=0; y<9; y++){
- if(!fs[x][y].assigned()){
- for (int d=1; d<=9; d++){
- if(fs[x][y].in(d)){
- Board* copy = new Board(*this);
- bool test = (*copy).assign(x,y,d);
- if(test){
- return copy->search();
- }
- }
- }
- return NULL;
- }
- else{
- return copy;
- }
- }
- }
Add Comment
Please, Sign In to add comment