-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHearthstoneStats.java
More file actions
39 lines (32 loc) · 1.23 KB
/
Copy pathHearthstoneStats.java
File metadata and controls
39 lines (32 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import java.util.*;
public class HearthstoneStats{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
//calculate the % chance of drawing a card in your opener
System.out.print("How many of this card do you run in your deck?");
int i = sc.nextInt();
System.out.println();
System.out.print("Are you going first? (y/n)");
char c = sc.next().charAt(0);
System.out.println();
boolean invalid = false;
int openerChance, drawChance;
if(c.equals("y")){
if(i = 0){
openerChance = 0;
drawChance = 0;
}else if(i == 1){
openerChance = (1/30 * 1/29 * 1/28) //Is this math right?
}else if(i == 2){
}else{
invalid = true;
}
}
if(!invalid){
System.out.println("The chance of having this card in your opening hand is " + openerChance);
System.out.println("If you hard-mulligan, your chance of drawing that card is " + drawChance);
}else{
System.out.println("You entered an invalid card count!");
}
}
}