How do I make a String int terminator?
<p>So im making everyone's fun game "Rock, Paper, Scissors" I got everything working, except having the while loop repeat 3 time before stopping. Well it does repeat 3 times and stops, but the 2nd and 3rd repeat the variables don't change. Take a look at the code and tell me what I'm doing wrong.
**UPDATE: Now that I have everything working how do I get this "Q" string to terminate the loop?</p>

<pre><code>import java.util.Scanner;
import java.util.Random;

public class RockPaperScissors
{

    /**
     * (Insert a brief description that describes the purpose of this method)
     * 
     * @param args
     */
    public static void main(String[] args)
    {
        int compint;
        String usermove = "";
        String compmove = "";
        String winner = "";
        int count = 0;


        Scanner in = new Scanner(System.in);
        Random gen = new Random();

        System.out.println("Enter Rock(1), Paper(2), Scissors(3) {Q to quit]: ");
        int input = in.nextInt();       

        while (count &lt; 3)
        {
            compint = gen.nextInt(3) + 1;

            if (input == 1)
            {
                usermove = "Rock";
            }
            else if (input == 2)
            {
                usermove = "Paper";
            }
            else if (input == 3)
            {
                usermove = "Scissors";
            }

            if (compint == 1)
            {
                compmove = "Rock";
            }
            else if (compint == 2)
            {
                compmove = "Paper";
            }
            else if (compint == 3)
            {
                compmove = "Scissors";
            }

            if (compint == input)
            {
                winner = "TIE";
            }
            else if (compint == 1 &amp;&amp; input == 3)
            {
                winner = "COMPUTER";
            }
            else if (compint == 2 &amp;&amp; input == 1)
            {
                winner = "COMPUTER";
            }
            else if (compint == 3 &amp;&amp; input == 2)
            {
                winner = "COMPUTER";
            }
            else
            {
                winner = "USER";
            }

            System.out.print("Computer: " + compmove + " | ");
            System.out.print("You: " + usermove + " | ");
            System.out.println("Winner: " + winner);
            System.out.println();
            System.out.println("Enter Rock(1), Paper(2), Scissors(3) {Q to quit]: ");
            input = in.nextInt();
            count++;

        }
    }
}
</code></pre>

<p>Output:</p>

<pre><code>Enter Rock(1), Paper(2), Scissors(3) {Q to quit]: 
1
Computer: Scissors | You: Rock | Winner: USER

Enter Rock(1), Paper(2), Scissors(3) {Q to quit]: 
2
Computer: Rock | You: Paper | Winner: USER

Enter Rock(1), Paper(2), Scissors(3) {Q to quit]: 
Q
Exception in thread "main" java.util.InputMismatchException
    at java.util.Scanner.throwFor(Unknown Source)
    at java.util.Scanner.next(Unknown Source)
    at java.util.Scanner.nextInt(Unknown Source)
    at java.util.Scanner.nextInt(Unknown Source)
    at RockPaperScissors.main(RockPaperScissors.java:102)
</code></pre>
