Betting and Search for uniqueness
<p>I've been working ahead in my intro class and I've almost finished my last project, Keno. its a betting game that rewards money according to how many numbers you matched with the dealer. I'm having issues on where to put the betting aspect, they start with 100$ and are asked to wage a certain amount of money.  I don't know which method that would go under for it to still work because my methods aren't voids, so i wont be able to return more than one data value.</p>

<p>My second issue, maybe the more important one, is that they need to be unique numbers. To do that i would need to search the array of numbers every time to see if they match, or use an array of booleans to keep track of the numbers. I don't know how i would do the second but i have a good idea of what i would do with the first. The issue is that im using a do while already, im not sure how i could add the for loop with a nested for loop in. Here is my code, sorry if its messy, i know my teacher hates my curly braces:</p>

<pre><code>package Keno;

import cs1.Keyboard;

public class Keno {
    public static void main(String[]args){
        int userArr[]=user();
        int compArr[]=computer();
        int howMany=matchNums(compArr,userArr);
        int moneyGained=betting(howMany);

        System.out.println("You matched "+howMany+" numbers");
        System.out.println("You have gained "+moneyGained+" dollars!");

    }

    public static int[] computer(){
        int []compChoice=new int[20];
        for(int x=0;x&lt;compChoice.length;x++){
            compChoice[x]=(int)(Math.random()*81);
        }
        return compChoice;
    }
    public static int[] user(){
        int choice[]=new int[7];
        System.out.println("Welcome to Keno!");
        System.out.println("Choose 7 unique numbers ranging from 1-80");
        System.out.println("*************************************************");
        //assigns numbers to choice array
        for(int x=0;x&lt;choice.length;x++){
            do{
                int temp=x+1;
                System.out.println("number "+temp+": ");
                choice[x]=Keyboard.readInt();
            }while(choice[x]&lt;0||choice[x]&gt;80);

        }
        System.out.println("Thanks!");
        System.out.println("*************************************************");
        return choice;

    }
    public static int matchNums(int arr1[], int arr2[]){
        int count=0;
        //checks each array slot individually to see if they match
        for(int x=0;x&lt;arr1.length;x++){
            for(int y=0;y&lt;arr2.length;y++){
                if(arr1[x]==arr2[y]){
                    count++;
                }
            }
        }
        return count;
    }
    public static int betting(int matches){
        int moneyGained=0;
        if(matches==7){
            moneyGained=12000;
        }else if(matches==6){
            moneyGained=200;
        }else if(matches==5){
            moneyGained=20;
        }else if(moneyGained==4){
            moneyGained=1;
        }
        return moneyGained;
    }

}
</code></pre>
