import java.util.ArrayList;
import java.util.Random;
/**
 * Manipulates collections of Random Numbers.
 * 
 * @author Darren Lim
 * @version 1.0
 */
public class RandomNumbers
{

    /**
     * Creates and returns an ArrayList of six Pick6 lotto numbers 
     * 
     * @return     An ArrayList of 6 integers between 1 and 49
     */
    public ArrayList<Integer> getRandomPick6()
    {
        ArrayList<Integer> arrList = new ArrayList<Integer>();
        Random rnd = new Random();
        
        for (int i = 0; i < 6; i++)
        {
            int choice = rnd.nextInt(49) + 1;
            if (! arrList.contains(choice))
            {
              arrList.add(choice);
            }
            else
            {
              i--;
            }
        }
        return arrList;
    }
}
