From fa8368f9f1bcd6a120760eef393fc9c13c573b11 Mon Sep 17 00:00:00 2001 From: Sveska <71780870+Sveska@users.noreply.github.com> Date: Wed, 27 Apr 2022 20:56:23 -0400 Subject: [PATCH] Update Driver.java --- Driver.java | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) diff --git a/Driver.java b/Driver.java index fea55ee..c70a0e3 100644 --- a/Driver.java +++ b/Driver.java @@ -2,6 +2,7 @@ import java.util.ArrayList; import java.util.Random; public class Driver { + static Player player; Enemy enemy = new Enemy(); static int health; @@ -15,18 +16,35 @@ public class Driver { static Trinket angelAmulet; static Trinket rabbitsFoot; static Trinket soulOfMarmu; + public static void main(String[] args) { String name; Scanner kb = new Scanner(System.in); Random npc = new Random(); createConsumables(); createTrinkets(); + createLocation(); int restCounter = 1; int limit1 = 1; int limit2 = 1; int limit3 = 1; ptrinkets = new ArrayList(); pconsumables = new ArrayList(); + String locationName1 = "Alabasta"; + String locationName2 = "Skypiea"; + int location1Diff = 3; + int location2Diff = 4; + String locationDesc1; + String locationDesc2; + + locationDesc1 = "\nA dry sandy wind brushes across your face... You are now entering " + locationName1 + + "\n" + locationName1 + " is a Kingdom located in the midst of a vast Desert" + + "\n" + locationName1 + " has a difficulty rating of " + location1Diff; + + locationDesc2 = "\nA cool breeze blows by... you are now entering " + locationName2 + + "\n" + locationName2 + " is an island located in the clouds" + + "\n" + locationName2 + " has a difficulty rating of " + location2Diff; + System.out.println("(Enter your name.)"); name = kb.nextLine(); health = 200; @@ -45,7 +63,9 @@ public static void main(String[] args) { "\nMoney: " + currency + "\nMP: " + mp + "\nStamina: " + stamina); - // location shit + System.out.println("You exit your hometown with a fire in your eyes! Excited to explore the unknown.\n" + + locationName1.toUpperCase() + "\n" + + locationDesc1); int choice; do { if (ptrinkets.contains(emeraldRing)) @@ -97,7 +117,16 @@ public static void main(String[] args) { System.out.println("Sorry, but you may only rest once per area."); } case 3: - // Trade + Trade trade1 = new Trade(strinkets.get(1), sconsumables.get(0), pconsumables); + int returnInt = trade1.makeTrade(strinkets, pconsumables); + if(returnInt == 1){ + ptrinkets.add(strinkets.get(1)); + } + else{ + + } + pconsumables=trade1.getConsumables(); + break; case 4: Shop shop1 = new Shop(currency, ptrinkets, pconsumables, strinkets.get(0), sconsumables.get(0), @@ -220,6 +249,11 @@ public static void createConsumables() sconsumables.add(mpPotion); sconsumables.add(purpleApple); } + + public static void createLocation() + { + + } public static void intro(){ Scanner kb = new Scanner(System.in); System.out.println("A strange, ornate letter sits atop your lopsided, peeling table. Very strange, considering you live" +