Skip to content

Commit

Permalink
Merge pull request #35 from JaiMaaSheeravali/tut-level
Browse files Browse the repository at this point in the history
updated tutorial-Levels
  • Loading branch information
guptaprakhariitr authored May 19, 2021
2 parents d9b5a43 + dc12066 commit 209b729
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/levels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ bool check_password(int level)
if (curr_pass == passwd_list[level - 1])
{
cout << "Success!!\n";
unlocked[level] = 1;

if (level == 6)
cout << "All levels completed!\n";
else
else if (!unlocked[level])
curr_level++;
unlocked[level] = 1;

return 1;
}
Expand Down

0 comments on commit 209b729

Please sign in to comment.