Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void main (String[] args){
- System.out.println("Welcome to Hearthstone Ladder. Enter win or lose");
- int rank = 25;
- int winstreak = 0;
- int stars = 0;
- String win = "win";
- Scanner sc = new Scanner(System.in);
- while (rank > 20 && stars < 3){
- win = sc.next();
- if (win.equals("win")){
- if (stars == 2){
- rank--;
- stars = stars - stars + 1;
- winstreak++;
- if (winstreak >= 3){
- stars++;
- System.out.println("Winstreak! Bonus Star! Rank " + rank + " " + stars + " stars");
- }
- else
- System.out.println("Rank " + rank + " " + stars + " stars");
- }
- else if (stars < 2){
- winstreak++;
- stars++;
- if (winstreak >= 3)
- stars++;
- System.out.println("Rank " + rank + " " + stars + " stars");
- }
- if (win.equals("lose")){
- winstreak = winstreak - winstreak;
- System.out.println("\nYou cannot lose stars at this rank. Rank " + rank + " " + stars + " stars");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement