From 5081344279430d274ec89a342365bf4512a75ad0 Mon Sep 17 00:00:00 2001 From: 22003 Date: Mon, 25 Nov 2024 10:45:22 +0400 Subject: [PATCH 1/2] Fixed scramble func --- project_3x3_rubik_solver.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/project_3x3_rubik_solver.cpp b/project_3x3_rubik_solver.cpp index 571e055..08c0df2 100644 --- a/project_3x3_rubik_solver.cpp +++ b/project_3x3_rubik_solver.cpp @@ -156,8 +156,10 @@ int main() void scramble() { // Get the scramble moves from the user + cin.ignore(numeric_limits::max(), '\n'); // Clear any leftover newline cout << "Enter the scramble: "; - string moves; getline(cin, moves); + string moves; + getline(cin, moves); // Parse and apply the moves string move = ""; From 547a4cf7b9c003a2ea4a2c40c9c97d9dbaac832c Mon Sep 17 00:00:00 2001 From: 22003 Date: Mon, 25 Nov 2024 10:47:31 +0400 Subject: [PATCH 2/2] Slight Menu changes --- project_3x3_rubik_solver.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/project_3x3_rubik_solver.cpp b/project_3x3_rubik_solver.cpp index 08c0df2..e971232 100644 --- a/project_3x3_rubik_solver.cpp +++ b/project_3x3_rubik_solver.cpp @@ -77,16 +77,16 @@ void displayMenu() { do { // Display the menu - cout << "============ Rubik's Cube Solver ============" << endl + cout << "============ Welcome to Rubik's Cube Solver ============" << endl << "1. Scramble the cube" << endl - << "2. Solve F2L (First Two Layers)" - << "3. Solve OLL (Orientation of the Last Layer)" << endl - << "4. Solve PLL (Permutation of the Last Layer)" << endl - << "5. Display the cube" << endl + << "2. Solve F2L " << endl + << "3. Solve OLL " << endl + << "4. Solve PLL" << endl + << "5. Display cube" << endl << "6. Check if cube is solved" << endl << "7. Reset the cube" << endl << "8. Exit" << endl - << "=============================================" << endl + << "=============================================" << endl << endl << "Enter your choice (1-8): "; cin >> choice; if (cin.fail()) {