import java.io.File;
import java.util.ArrayList;
import java.util.Scanner;

/**
 * Class with static methods for calculating the maximum streak winnings (MSW)
 * over a sequence of poker games.
 *   @author Dave Reed (and completed by YOUR NAME HERE)
 *   @version 2/18/18
 */
public class Poker {
    public static void main(String[] args) throws java.io.FileNotFoundException {
        System.out.print("Enter the file name: ");
        Scanner input = new Scanner(System.in);
 
        String filename = input.next();       
        Scanner infile = new Scanner(new File(filename));
        
        ArrayList<Integer> results = new ArrayList<Integer>();
        while (infile.hasNextInt()) {
            results.add(infile.nextInt());
        }
        
        StopWatch watch = new StopWatch();
        
        watch.start();
        int answer1 = Poker.mswBrute(results);  
        watch.stop();
        System.out.println("Brute force:      $" + answer1 + " in " + watch.getElapsedTime() + " msec");
        
        watch.start();
        int answer2 = Poker.mswDivide(results); 
        watch.stop(); 
        System.out.println("Divide & Conquer: $" + answer2 + " in " + watch.getElapsedTime() + " msec");       
    }
    
    /**
     * Calculates (using brute force) the maximum streak winnings over a 
     * sequence of poker games.
     *   @param results the game results (amounts won/lost per game)
     *   @return the maximum amount won over a consecutive game streak
     */
    public static int mswBrute(ArrayList<Integer> results) {
        return 0;   // YOU MUST IMPLEMENT THIS
    }

    /**
     * Calculates (using divide and conquer) the maximum streak winnings over a 
     * sequence of poker games.
     *   @param results the game results (amounts won/lost per game)
     *   @return the maximum amount won over a consecutive game streak
     */    
    public static int mswDivide(ArrayList<Integer> results) {
        return 0;   // YOU MUST IMPLEMENT THIS
    }
}
