package vorbereitungen.MonteCarlo;

import java.util.Scanner;

public class MonteCarlo {
    public static void main(String args[]) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("Enter how many attempts you want to run:");
        String attempts = scanner.nextLine();

        try {
            int num_attempts = Integer.parseInt(attempts);
        } catch(NumberFormatException nfe) {
            System.out.println("Invalid input.");
            scanner.close();
            System.exit(1);
            return;
        }
        int num_attempts = Integer.parseInt(attempts);

        System.out.println("Enter how large the initial bankroll should be:");
        String bankroll = scanner.nextLine();

        try {
            int num_bankroll = Integer.parseInt(bankroll);
        } catch(NumberFormatException nfe) {
            System.out.println("Invalid input.");
            scanner.close();
            System.exit(1);
            return;
        }
        int num_bankroll = Integer.parseInt(bankroll);

        System.out.println("Enter the Betsize you want to use for this simulation:");
        String betsize = scanner.nextLine();

        try {
            int num_betsize = Integer.parseInt(betsize);
        } catch(NumberFormatException nfe) {
            System.out.println("Invalid input.");
            scanner.close();
            System.exit(1);
            return;
        }
        int num_betsize = Integer.parseInt(betsize);

        scanner.close();

        Simulation simulation = new Simulation(num_attempts, num_bankroll, num_betsize);
        simulation.run();
    }
}
