// Arup Guha
// 8/15/2019
// Framework for 2018 AP FR Question #1: Frog Simulation

import java.util.*;

public class FrogSimulation {

	// I added this to implement hopDistance.
	private static Random r = new Random();
	
	// I added this so you can see each hop (or not...)
	// When you write your simulate method, just do if (DEBUG) System.out.println(...)
	// for each hop.
	private static boolean DEBUG = true;
	
	private int goalDistance;
	private int maxHops;
	
	public FrogSimulation(int dist, int numHops) {
		goalDistance = dist;
		maxHops = numHops;
	}
	
	// I made this randomly, so the distance hopped ranges from -5 to 14,
	// inclusive, each value equally likely. Avg jump = (14-5)/2 = 4.5
	private int hopDistance() {
		return r.nextInt(20) - 5;
	}
	
	public boolean simulate() {
		// Change this to solve the problem.
		return true;
	}
	
	public double runSimulations(int num) {
		// Change this to solve the problem.
		return 0.4;
	}
	
	// A little test.
	public static void main(String[] args) {
		FrogSimulation kermit = new FrogSimulation(24, 5);
		double success = kermit.runSimulations(1000);
		System.out.printf("Prob of success = %.3f\n", success);
	}
}