@Override public void startPlayerCardActions() { Scanner input = new Scanner(System.in); do { System.out.println("Want to play 'Scoll' action?\n1-yes\n2-No"); int value = input.nextInt(); if (!((value == 1) || (value == 2))) { System.out.println("Wrong choice"); continue; } // perform scroll if (value == 1) { scroll(); } break; } while (true); do { System.out.println("Want to play 'Place a Minion' action?\n1-yes\n2-No"); int value = input.nextInt(); if (!((value == 1) || (value == 2))) { System.out.println("Wrong choice"); continue; } // perform take money if (value == 1) { Helper.placeMinion(board, p); } break; } while (true); }
@Override public void scroll() { if (Helper.takeFromBank(10, p)) { System.out.println("Successfully got the loan!"); // p.loan++; p.setLoan(p.getLoan() + 1); } }