Skip to content

Commit

Permalink
Update Main.java
Browse files Browse the repository at this point in the history
  • Loading branch information
rohan-bansal authored Jul 22, 2018
1 parent 0c338d9 commit 2b96ee3
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ static void gameLoop(GameUtils gameutils) throws java.lang.Exception {
static void Menu(Scanner in, GameUtils gu) throws java.lang.Exception {
String ph;
TypeLine(ANSI_BLUE + "\n==========MENU==========" + ANSI_RESET);
TypeLine(ANSI_GREEN + "\n\t[p] Play level " + playlevel + ANSI_PURPLE + "\n\t[f] Forge a New Card" + ANSI_YELLOW + "\n\t[u] to upgrade a card" + ANSI_WHITE + "\n\t[c] to view current deck" +
"\n\t[m] Modify current deck\n\t[v] View Card Inventory\n\t[l] Check player level\n\t[d] View amount of dust in balance\n\t[e] View this menu\n\t'STATS' (nameOfCard) to see card statistics\n\t" + "\u001B[22m" + " i.e STATS Wizard" + ANSI_RESET);
TypeLine(ANSI_GREEN + "\n\t[p] Play level " + playlevel + ANSI_PURPLE + "\n\t[f] Forge a New Card" + ANSI_YELLOW + "\n\t[u] to upgrade a card" + ANSI_WHITE + "\n\t[c] to view Battle Deck" +
"\n\t[m] Modify Battle Deck\n\t[v] View Card Inventory\n\t[l] Check player level\n\t[d] View amount of dust in balance\n\t[e] View this menu\n\t'STATS' (nameOfCard) to see card statistics\n\t" + "\u001B[22m" + " i.e STATS Wizard" + ANSI_RESET);
while(true) {
TypeLine(ANSI_YELLOW + "\n[type a letter] --> " + ANSI_RESET);
ph = in.nextLine();
Expand All @@ -105,7 +105,7 @@ static void Menu(Scanner in, GameUtils gu) throws java.lang.Exception {
} else if(ph.toLowerCase().equals("c")) {
gu.listcards(gu.currentdeck);
} else if(ph.toLowerCase().equals("m")) {

gu.modifyDeck();
} else if(ph.toLowerCase().equals("u")) {
TypeLine(ANSI_PURPLE + "Name of the Card: " + ANSI_RESET);
ph = in.nextLine();
Expand Down Expand Up @@ -137,10 +137,12 @@ static void Menu(Scanner in, GameUtils gu) throws java.lang.Exception {

} else if(ph.toLowerCase().equals("d")) {
TypeLine(ANSI_GREEN + ANSI_BOLD + "Dust: " + dust + ANSI_RESET);
} else if(ph.substring(0,5).toLowerCase().equals("stats")) {
for(Card part : gu.currentdeck) {
if((part.getName().toLowerCase()).equals(ph.substring(6).toLowerCase())) {
part.getFullStats();
} else if(ph.length() > 1) {
if(ph.substring(0,5).toLowerCase().equals("stats")) {
for(Card part : gu.currentdeck) {
if((part.getName().toLowerCase()).equals(ph.substring(6).toLowerCase())) {
part.getFullStats();
}
}
}
} else {
Expand Down

0 comments on commit 2b96ee3

Please sign in to comment.