From dc120661e4ef3a017870ee0f42ca86605a04c5ca Mon Sep 17 00:00:00 2001 From: anchalkejriwal Date: Sun, 16 May 2021 14:47:22 +0530 Subject: [PATCH] updated tutorial-Levels --- src/levels.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/levels.cpp b/src/levels.cpp index cbcf527..9d5fb7e 100644 --- a/src/levels.cpp +++ b/src/levels.cpp @@ -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; }