Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bool PuzzleArea::hasPathToCenter(PuzzleArea *test, PuzzleArea *ignore)
- {
- if (test != Q_NULLPTR) {
- for (PuzzleArea *n : test->neighbours) {
- if (n != Q_NULLPTR) {
- if (n->isCentral()) {
- return true;
- }
- if (n->isPuzzle() && ignore != n) {
- if (hasPathToCenter(n, ignore)) {
- return true;
- }
- }
- }
- }
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement