//TODO: this may take foreever. fix
private int generateNewTicketNumber() 
    {
        //TODO: this may take foreever. fix
        int generated = numberGenerator.next();
        while(purchased.containsKey(generated)){
            generated = numberGenerator.next();
        }
        return generated;
    }
private int generateNewTicketNumber()
{
//TODO: this may take foreever. fix
int generated = numberGenerator.next();
while(purchased.containsKey(generated)){
private int generateNewTicketNumber()
{
//TODO: this may take foreever. fix
int generated = numberGenerator.next();
while(purchased.containsKey(generated)){
generated = numberGenerator.next();
}
return generated;
}
private int generateNewTicketNumber()
{
//TODO: this may take foreever. fix
int generated = numberGenerator.next();
while(purchased.containsKey(generated)){
generated = numberGenerator.next();
}
return generated;
}