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

Update Driver.java #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
38 changes: 36 additions & 2 deletions Driver.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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<Trinket>();
pconsumables = new ArrayList<Consumable>();
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;
Expand All @@ -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))
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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" +
Expand Down