// Arup Guha
// 4/9/2016
// Framework for 2009 AP Computer Science A
// Free Response Section Problem 1: NumberCube

import java.util.*;

public class NumberCube {

	/*** This wasn't given, but I am writing an implementation of it so that
	 *   I can test my solution
	 **/

	Random r;

	public NumberCube() {
		r = new Random();
	}

	public int toss() {
		return r.nextInt(6)+1;
	}

	// Fill in solution for Part A.
	public static int[] getCubeTosses(NumberCube cube, int numTosses) {


	}

	// Fill in solution for Part B.
	public static int getLongestRun(int[] values) {


	}

	// For testing purposes.
	public static void print(int[] vals) {

		for (int i=0; i<vals.length; i++)
			System.out.print(vals[i]+" ");
		System.out.println();
	}


	// Test these methods.
	public static void main(String[] args) {

		// Test for part (b)
		NumberCube myDie = new NumberCube();
		int[] rolls = {1,5,5,4,3,1,2,2,2,2,6,1,3,3,5,5,5,5};
		System.out.println("The longest run for the sample starts at index "+getLongestRun(rolls));

		// Test for part (a) and (b)
		rolls = getCubeTosses(myDie, 40);
		print(rolls);
		System.out.println("The longest run for this array starts at index "+getLongestRun(rolls));

	}
}
