Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed custom sandwich not working #21

Merged
merged 1 commit into from
May 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified out/artifacts/DELIcious_app_jar/DELIcious-app.jar
Binary file not shown.
26 changes: 3 additions & 23 deletions src/main/java/com/pluralsight/ui/CreateSandwichScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,28 +35,6 @@ public void sandwichCreationHomeScreen() {
processSandwichHomeScreenMenuChoice();
}

public void sandwichEditScreen() {
Sandwich userSandwich = new Sandwich();
Text.clearConsole();
System.out.printf("\n%s\n", userSandwich.displayCurrentSandwich());
System.out.println(Text.centerMessage("Customize your sandwich", 45, '-'));
System.out.print("""

[1] Choose bread size
[2] Choose bread type
[3] Choose meats (extra charge)
[4] Choose regular toppings
[5] Choose cheese (only 1 cheese allowed)
[6] Choose sauces

[f] Finalize sandwich
[x] Cancel sandwich

Enter choice:\s""");

if (processCustomSandwichCreationMenuChoice(userSandwich)) sandwichEditScreen();
}

public void sandwichEditScreen(Sandwich userSandwich) {
Text.clearConsole();
System.out.printf("\n%s\n", userSandwich.displayCurrentSandwich());
Expand Down Expand Up @@ -101,7 +79,9 @@ private void processSandwichHomeScreenMenuChoice() {

switch (userChoice) {
case "1":
sandwichEditScreen();
Sandwich userSandwich = new Sandwich();

sandwichEditScreen(userSandwich);
break;
case "2":
chooseSignatureSandwichScreen();
Expand Down