package main; import java.util.Random; import java.util.Scanner; import javax.swing.JOptionPane; public class main { public static void main(String [] args){ Scanner sc = new Scanner(System.in); Random rm = new Random(); int rate = 2; double sday = 1000000000*rate; //player ca 100, 10.000.000 * 100, int xday = 1000000000*rate;//rm.nextInt(1000000) + 500000; double inf = 0; int b, c; double a; System.out.println("How many Days do you want to simulate?"); int rounds = Integer.parseInt(sc.next()); System.out.println("How many Option do you want to show?"); int options = Integer.parseInt(sc.next()); System.out.println("Money: " + xday); for(int i = 0; i < rounds ; i++){ int WhitePotion = 1200*rate; inf = (xday/sday); a = rm.nextInt(120000*rate); if(inf > 1){ a = a / (Math.exp(inf)); } //System.out.println(inf + ":" + xday + "/" + sday); xday = (int) (xday + (a - (c = ((b = rm.nextInt(100)) * WhitePotion)))); switch(options){ case 1: System.out.println("Inf Value: " + inf); //+ " : a:" + a); break; case 2: System.out.println("WhitePotion costs: " + WhitePotion); break; case 3: System.out.println("Bought " + b + " WhitePotions" ); break; case 4: System.out.println("Money on Server: " + xday); break; case 5: System.out.println("Debug Values: " + xday + " : " + a + " : " + c); break; default: System.out.println("Inf Value: " + inf); System.out.println("WhitePotion costs: " + WhitePotion); System.out.println("Bought " + b + " WhitePotions" ); System.out.println("Money on Server: " + xday); System.out.println("Debug Values: " + xday + " : " + a + " : " + c); System.out.println("---------------------------"); break; } } } }