void SortedList::addComponent(Component *c) { c->setParent_(this); tabComponent_.insert(std::pair<int,Component*>(id_,c)); ++id_; checkIfPossible(); }
//==================================== // when user eats a number, check if // the number completes the exercise //==================================== bool AdvExercise::isPossibleSolution(unsigned int tryNum){ if (checkIfPossible(tryNum) == true){ for (int i = 0; i<4; ++i) if (arrNum[i] == EMPTY_CELL){ arrNum[i] = tryNum; createAdvExerciseString(); missingVars = 1; i = 4; } return true; } return false; }