the shop now uses the player class as a parent class.
This commit is contained in:
@@ -1,25 +1,17 @@
|
||||
import java.util.Random;
|
||||
import java.util.Scanner;
|
||||
public class TaipanShop {
|
||||
public class TaipanShop extends Player {
|
||||
|
||||
private String name = "Taipan";
|
||||
private int bank = 0;
|
||||
private int money = 1000;
|
||||
private int opiumHeld = 0;
|
||||
private int silkHeld = 0;
|
||||
private int generalHeld = 0;
|
||||
private int armsHeld = 0;
|
||||
private Player player = new Player();
|
||||
private int cargoSpace = 60;
|
||||
private int currentCargo = 0;
|
||||
private int opiumPrice = 16000;
|
||||
private int silkPrice = 1600;
|
||||
private int armsPrice = 160;
|
||||
private int generalPrice = 8;
|
||||
private int location = 1;
|
||||
private int guns = 0;
|
||||
|
||||
public void updatePrices(){
|
||||
String s = "\n" + name + ", the price of ";
|
||||
private void updatePrices(){
|
||||
String s = "\n" + player.getName() + ", the price of ";
|
||||
double value = 80*Math.random();
|
||||
Random rand = new Random();
|
||||
opiumPrice = (rand.nextInt(201) + 60)*100;
|
||||
@@ -63,19 +55,19 @@ public class TaipanShop {
|
||||
}
|
||||
}
|
||||
|
||||
public void printShop(){
|
||||
currentCargo = opiumHeld+guns*10+silkHeld+armsHeld+generalHeld;
|
||||
private void printShop(){
|
||||
currentCargo = player.getOpiumHeld()+player.getGuns()*10+player.getSilkHeld()+player.getArmsHeld()+player.getGeneralHeld();
|
||||
if(cargoSpace - currentCargo < 0){
|
||||
System.out.println("Hold: Overloaded" + " Guns: " + guns);
|
||||
System.out.println("Hold: Overloaded" + " Guns: " + player.getGuns());
|
||||
}else{
|
||||
System.out.println("Hold: " + (cargoSpace-currentCargo) + " Guns: " + guns);
|
||||
System.out.println("Hold: " + (cargoSpace-currentCargo) + " Guns: " + player.getGuns());
|
||||
}
|
||||
System.out.println("-------------------------------------------------------------");
|
||||
System.out.println(" Opium: " + opiumHeld + " Silk: " + silkHeld);
|
||||
System.out.println(" Arms: " + armsHeld + " General: " + generalHeld);
|
||||
System.out.println(" Opium: " + player.getOpiumHeld() + " Silk: " + player.getSilkHeld());
|
||||
System.out.println(" Arms: " + player.getArmsHeld() + " General: " + player.getGeneralHeld());
|
||||
System.out.println("-------------------------------------------------------------");
|
||||
System.out.println("Cash: " + money + " Bank: " + bank+"\n");
|
||||
System.out.println(name + ", present prices per unit here are:");
|
||||
System.out.println("Cash: " + player.getMoney() + " Bank: " + player.getBank()+"\n");
|
||||
System.out.println(player.getName() + ", present prices per unit here are:");
|
||||
System.out.println(" Opium: " + opiumPrice + " Silk: " + silkPrice);
|
||||
System.out.println(" Arms: " + armsPrice + " General: " + generalPrice);
|
||||
}
|
||||
@@ -84,70 +76,70 @@ public class TaipanShop {
|
||||
updatePrices();
|
||||
Scanner input = new Scanner(System.in);
|
||||
boolean notDone = true;
|
||||
if (location == 1) {
|
||||
if (player.getLocation() == 1) {
|
||||
while (notDone) {
|
||||
printShop();
|
||||
System.out.println("\nShall I Buy, Sell, Visit Bank, Transfer Cargo, or Quit Trading?");
|
||||
String response = input.next();
|
||||
if (response.equalsIgnoreCase("B")) {
|
||||
boolean notDone2 = true;
|
||||
System.out.println("What do you wish me to buy, " + name + "?");
|
||||
System.out.println("What do you wish me to buy, " + player.getName() + "?");
|
||||
while (notDone2) {
|
||||
response = input.nextLine();
|
||||
if (response.equalsIgnoreCase("O")) {
|
||||
System.out.println("\nHow much Opium shall I buy, " + name + "? (You can afford " + money / opiumPrice + ")");
|
||||
System.out.println("\nHow much Opium shall I buy, " + player.getName() + "? (You can afford " + player.getMoney() / opiumPrice + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= money / opiumPrice && num >= 0) {
|
||||
opiumHeld += num;
|
||||
money -= num * opiumPrice;
|
||||
if (num <= player.getMoney() / opiumPrice && num >= 0) {
|
||||
player.setOpiumHeld(player.getOpiumHeld()+num);
|
||||
player.setMoney(player.getMoney()-num * opiumPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you can't afford that!");
|
||||
System.out.println(player.getName() + ", you can't afford that!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to buy " + "'" + num + "'" + " Opium?");
|
||||
System.out.println(player.getName() + ", how am I supposed to buy " + "'" + num + "'" + " Opium?");
|
||||
}
|
||||
}
|
||||
} else if (response.equalsIgnoreCase("S")) {
|
||||
System.out.println("\nHow much Silk shall I buy, " + name + "? (You can afford " + money / silkPrice + ")");
|
||||
System.out.println("\nHow much Silk shall I buy, " + player.getName() + "? (You can afford " + player.getMoney() / silkPrice + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= money / silkPrice && num >= 0) {
|
||||
silkHeld += num;
|
||||
money -= num * silkPrice;
|
||||
if (num <= player.getMoney() / silkPrice && num >= 0) {
|
||||
player.setSilkHeld(player.getSilkHeld()+num);
|
||||
player.setMoney(player.getMoney()-num * silkPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you can't afford that!");
|
||||
System.out.println(player.getName() + ", you can't afford that!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to buy " + "'" + num + "'" + " Silk?");
|
||||
System.out.println(player.getName() + ", how am I supposed to buy " + "'" + num + "'" + " Silk?");
|
||||
}
|
||||
}
|
||||
} else if (response.equalsIgnoreCase("A")) {
|
||||
System.out.println("\nHow many Arms shall I buy, " + name + "? (You can afford " + money / armsPrice + ")");
|
||||
System.out.println("\nHow many Arms shall I buy, " + player.getName() + "? (You can afford " + player.getMoney() / armsPrice + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= money / armsPrice && num >= 0) {
|
||||
armsHeld += num;
|
||||
money -= num * armsPrice;
|
||||
if (num <= player.getMoney() / armsPrice && num >= 0) {
|
||||
player.setArmsHeld(player.getArmsHeld()+num);
|
||||
player.setMoney(player.getMoney() - num*armsPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you can't afford that!");
|
||||
System.out.println(player.getName() + ", you can't afford that!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to buy " + "'" + num + "'" + " Arms?");
|
||||
System.out.println(player.getName() + ", how am I supposed to buy " + "'" + num + "'" + " Arms?");
|
||||
}
|
||||
}
|
||||
} else if (response.equalsIgnoreCase("G")) {
|
||||
System.out.println("\nHow much General Cargo shall I buy, " + name + "? (You can afford " + money / generalPrice + ")");
|
||||
System.out.println("\nHow much General Cargo shall I buy, " + player.getName() + "? (You can afford " + player.getMoney() / generalPrice + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= money / generalPrice && num >= 0) {
|
||||
generalHeld += num;
|
||||
money -= num * generalPrice;
|
||||
if (num <= player.getMoney() / generalPrice && num >= 0) {
|
||||
player.setGeneralHeld(player.getGeneralHeld()+num);
|
||||
player.setMoney(player.getMoney() - num*generalPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you can't afford that!");
|
||||
System.out.println(player.getName() + ", you can't afford that!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to buy " + "'" + num + "'" + " General Cargo?");
|
||||
System.out.println(player.getName() + ", how am I supposed to buy " + "'" + num + "'" + " General Cargo?");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -156,63 +148,63 @@ public class TaipanShop {
|
||||
|
||||
} else if (response.equalsIgnoreCase("S")) {
|
||||
boolean notDone2 = true;
|
||||
System.out.println("What do you wish me to sell, " + name + "?");
|
||||
System.out.println("What do you wish me to sell, " + player.getName() + "?");
|
||||
while (notDone2) {
|
||||
response = input.nextLine();
|
||||
if (response.equalsIgnoreCase("O")) {
|
||||
System.out.println("\nHow much Opium shall I sell, " + name + "? (You have " + opiumHeld + ")");
|
||||
System.out.println("\nHow much Opium shall I sell, " + player.getName() + "? (You have " + player.getOpiumHeld() + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= opiumHeld && num >= 0) {
|
||||
opiumHeld -= num;
|
||||
money += num * opiumPrice;
|
||||
if (num <= player.getOpiumHeld() && num >= 0) {
|
||||
player.setOpiumHeld(player.getOpiumHeld()-num);
|
||||
player.setMoney(player.getMoney() + num*opiumPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you don't have that many to sell!");
|
||||
System.out.println(player.getName() + ", you don't have that many to sell!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to sell " + "'" + num + "'" + " Opium?");
|
||||
System.out.println(player.getName() + ", how am I supposed to sell " + "'" + num + "'" + " Opium?");
|
||||
}
|
||||
}
|
||||
} else if (response.equalsIgnoreCase("S")) {
|
||||
System.out.println("\nHow much Silk shall I sell, " + name + "? (You have " + silkHeld + ")");
|
||||
System.out.println("\nHow much Silk shall I sell, " + player.getName() + "? (You have " + player.getSilkHeld() + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= silkHeld && num >= 0) {
|
||||
silkHeld -= num;
|
||||
money += num * silkPrice;
|
||||
if (num <= player.getSilkHeld() && num >= 0) {
|
||||
player.setSilkHeld(player.getSilkHeld()-num);
|
||||
player.setMoney(player.getMoney() + num*silkPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you don't have that many to sell!");
|
||||
System.out.println(player.getName() + ", you don't have that many to sell!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to sell " + "'" + num + "'" + " Silk?");
|
||||
System.out.println(player.getName() + ", how am I supposed to sell " + "'" + num + "'" + " Silk?");
|
||||
}
|
||||
}
|
||||
} else if (response.equalsIgnoreCase("A")) {
|
||||
System.out.println("\nHow many Arms shall I sell, " + name + "? (You have " + armsHeld + ")");
|
||||
System.out.println("\nHow many Arms shall I sell, " + player.getName() + "? (You have " + player.getArmsHeld() + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= armsHeld && num >= 0) {
|
||||
armsHeld -= num;
|
||||
money += num * armsPrice;
|
||||
if (num <= player.getArmsHeld() && num >= 0) {
|
||||
player.setArmsHeld(player.getArmsHeld()-num);
|
||||
player.setMoney(player.getMoney() + num*armsPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you don't have that many to sell!");
|
||||
System.out.println(player.getName() + ", you don't have that many to sell!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to sell " + "'" + num + "'" + " Arms?");
|
||||
System.out.println(player.getName() + ", how am I supposed to sell " + "'" + num + "'" + " Arms?");
|
||||
}
|
||||
}
|
||||
} else if (response.equalsIgnoreCase("G")) {
|
||||
System.out.println("\nHow much General Cargo shall I sell, " + name + "? (You have " + generalHeld + ")");
|
||||
System.out.println("\nHow much General Cargo shall I sell, " + player.getName() + "? (You have " + player.getGeneralHeld() + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= generalHeld && num >= 0) {
|
||||
generalHeld -= num;
|
||||
money += num * generalPrice;
|
||||
if (num <= player.getGeneralHeld() && num >= 0) {
|
||||
player.setGeneralHeld(player.getGeneralHeld()-num);
|
||||
player.setMoney(player.getMoney() + num*generalPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you don't have that many to sell!");
|
||||
System.out.println(player.getName() + ", you don't have that many to sell!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to sell " + "'" + num + "'" + " General Cargo?");
|
||||
System.out.println(player.getName() + ", how am I supposed to sell " + "'" + num + "'" + " General Cargo?");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -235,63 +227,63 @@ public class TaipanShop {
|
||||
String response = input.next();
|
||||
if (response.equalsIgnoreCase("B")) {
|
||||
boolean notDone2 = true;
|
||||
System.out.println("What do you wish me to buy, " + name + "?");
|
||||
System.out.println("What do you wish me to buy, " + player.getName() + "?");
|
||||
while (notDone2) {
|
||||
response = input.nextLine();
|
||||
if (response.equalsIgnoreCase("O")) {
|
||||
System.out.println("\nHow much Opium shall I buy, " + name + "? (You can afford " + money / opiumPrice + ")");
|
||||
System.out.println("\nHow much Opium shall I buy, " + player.getName() + "? (You can afford " + player.getMoney() / opiumPrice + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= money / opiumPrice && num >= 0) {
|
||||
opiumHeld += num;
|
||||
money -= num * opiumPrice;
|
||||
if (num <= player.getMoney() / opiumPrice && num >= 0) {
|
||||
player.setOpiumHeld(player.getOpiumHeld()+num);
|
||||
player.setMoney(player.getMoney() - num*opiumPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you can't afford that!");
|
||||
System.out.println(player.getName() + ", you can't afford that!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to buy " + "'" + num + "'" + " Opium?");
|
||||
System.out.println(player.getName() + ", how am I supposed to buy " + "'" + num + "'" + " Opium?");
|
||||
}
|
||||
}
|
||||
} else if (response.equalsIgnoreCase("S")) {
|
||||
System.out.println("\nHow much Silk shall I buy, " + name + "? (You can afford " + money / silkPrice + ")");
|
||||
System.out.println("\nHow much Silk shall I buy, " + player.getName() + "? (You can afford " + player.getMoney() / silkPrice + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= money / silkPrice && num >= 0) {
|
||||
silkHeld += num;
|
||||
money -= num * silkPrice;
|
||||
if (num <= player.getMoney() / silkPrice && num >= 0) {
|
||||
player.setSilkHeld(player.getSilkHeld()+num);
|
||||
player.setMoney(player.getMoney() - num*silkPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you can't afford that!");
|
||||
System.out.println(player.getName() + ", you can't afford that!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to buy " + "'" + num + "'" + " Silk?");
|
||||
System.out.println(player.getName() + ", how am I supposed to buy " + "'" + num + "'" + " Silk?");
|
||||
}
|
||||
}
|
||||
} else if (response.equalsIgnoreCase("A")) {
|
||||
System.out.println("\nHow many Arms shall I buy, " + name + "? (You can afford " + money / armsPrice + ")");
|
||||
System.out.println("\nHow many Arms shall I buy, " + player.getName() + "? (You can afford " + player.getMoney() / armsPrice + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= money / armsPrice && num >= 0) {
|
||||
armsHeld += num;
|
||||
money -= num * armsPrice;
|
||||
if (num <= player.getMoney() / armsPrice && num >= 0) {
|
||||
player.setArmsHeld(player.getArmsHeld()+num);
|
||||
player.setMoney(player.getMoney() - num*armsPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you can't afford that!");
|
||||
System.out.println(player.getName() + ", you can't afford that!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to buy " + "'" + num + "'" + " Arms?");
|
||||
System.out.println(player.getName() + ", how am I supposed to buy " + "'" + num + "'" + " Arms?");
|
||||
}
|
||||
}
|
||||
} else if (response.equalsIgnoreCase("G")) {
|
||||
System.out.println("\nHow much General Cargo shall I buy, " + name + "? (You can afford " + money / generalPrice + ")");
|
||||
System.out.println("\nHow much General Cargo shall I buy, " + player.getName() + "? (You can afford " + player.getMoney() / generalPrice + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= money / generalPrice && num >= 0) {
|
||||
generalHeld += num;
|
||||
money -= num * generalPrice;
|
||||
if (num <= player.getMoney() / generalPrice && num >= 0) {
|
||||
player.setGeneralHeld(player.getGeneralHeld()+num);
|
||||
player.setMoney(player.getMoney() - num*generalPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you can't afford that!");
|
||||
System.out.println(player.getName() + ", you can't afford that!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to buy " + "'" + num + "'" + " General Cargo?");
|
||||
System.out.println(player.getName() + ", how am I supposed to buy " + "'" + num + "'" + " General Cargo?");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -300,63 +292,63 @@ public class TaipanShop {
|
||||
|
||||
} else if (response.equalsIgnoreCase("S")) {
|
||||
boolean notDone2 = true;
|
||||
System.out.println("What do you wish me to sell, " + name + "?");
|
||||
System.out.println("What do you wish me to sell, " + player.getName() + "?");
|
||||
while (notDone2) {
|
||||
response = input.nextLine();
|
||||
if (response.equalsIgnoreCase("O")) {
|
||||
System.out.println("\nHow much Opium shall I sell, " + name + "? (You have " + opiumHeld + ")");
|
||||
System.out.println("\nHow much Opium shall I sell, " + player.getName() + "? (You have " + player.getOpiumHeld() + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= opiumHeld && num >= 0) {
|
||||
opiumHeld -= num;
|
||||
money += num * opiumPrice;
|
||||
if (num <= player.getOpiumHeld() && num >= 0) {
|
||||
player.setOpiumHeld(player.getOpiumHeld()-num);
|
||||
player.setMoney(player.getMoney() + num*opiumPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you don't have that many to sell!");
|
||||
System.out.println(player.getName() + ", you don't have that many to sell!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to sell " + "'" + num + "'" + " Opium?");
|
||||
System.out.println(player.getName() + ", how am I supposed to sell " + "'" + num + "'" + " Opium?");
|
||||
}
|
||||
}
|
||||
} else if (response.equalsIgnoreCase("S")) {
|
||||
System.out.println("\nHow much Silk shall I sell, " + name + "? (You have " + silkHeld + ")");
|
||||
System.out.println("\nHow much Silk shall I sell, " + player.getName() + "? (You have " + player.getSilkHeld() + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= silkHeld && num >= 0) {
|
||||
silkHeld -= num;
|
||||
money += num * silkPrice;
|
||||
if (num <= player.getSilkHeld() && num >= 0) {
|
||||
player.setSilkHeld(player.getSilkHeld()-num);
|
||||
player.setMoney(player.getMoney() + num*silkPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you don't have that many to sell!");
|
||||
System.out.println(player.getName() + ", you don't have that many to sell!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to sell " + "'" + num + "'" + " Silk?");
|
||||
System.out.println(player.getName() + ", how am I supposed to sell " + "'" + num + "'" + " Silk?");
|
||||
}
|
||||
}
|
||||
} else if (response.equalsIgnoreCase("A")) {
|
||||
System.out.println("\nHow many Arms shall I sell, " + name + "? (You have " + armsHeld + ")");
|
||||
System.out.println("\nHow many Arms shall I sell, " + player.getName() + "? (You have " + player.getArmsHeld() + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= armsHeld && num >= 0) {
|
||||
armsHeld -= num;
|
||||
money += num * armsPrice;
|
||||
if (num <= player.getArmsHeld() && num >= 0) {
|
||||
player.setArmsHeld(player.getArmsHeld()-num);
|
||||
player.setMoney(player.getMoney() + num*armsPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you don't have that many to sell!");
|
||||
System.out.println(player.getName() + ", you don't have that many to sell!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to sell " + "'" + num + "'" + " Arms?");
|
||||
System.out.println(player.getName() + ", how am I supposed to sell " + "'" + num + "'" + " Arms?");
|
||||
}
|
||||
}
|
||||
} else if (response.equalsIgnoreCase("G")) {
|
||||
System.out.println("\nHow much General Cargo shall I sell, " + name + "? (You have " + generalHeld + ")");
|
||||
System.out.println("\nHow much General Cargo shall I sell, " + player.getName() + "? (You have " + player.getGeneralHeld() + ")");
|
||||
while (notDone2) {
|
||||
int num = input.nextInt();
|
||||
if (num <= generalHeld && num >= 0) {
|
||||
generalHeld -= num;
|
||||
money += num * generalPrice;
|
||||
if (num <= player.getGeneralHeld() && num >= 0) {
|
||||
player.setGeneralHeld(player.getGeneralHeld()-num);
|
||||
player.setMoney(player.getMoney() + num*generalPrice);
|
||||
notDone2 = false;
|
||||
} else if (num >= 0) {
|
||||
System.out.println(name + ", you don't have that many to sell!");
|
||||
System.out.println(player.getName() + ", you don't have that many to sell!");
|
||||
} else {
|
||||
System.out.println(name + ", how am I supposed to sell " + "'" + num + "'" + " General Cargo?");
|
||||
System.out.println(player.getName() + ", how am I supposed to sell " + "'" + num + "'" + " General Cargo?");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user