Connect 4 against the computer
<p>Alright, so I'm very beginner and programming a connect 4 game. I've got it all coded so that two players may play against each other, but I'm wanting to add a function to play the computer.</p>

<p>I don't need it to be really smart and figure out the best place to drop the piece, I just need to use something as simple as the random function to place it but I'm lost on how to do so.</p>

<p>Here's what my code for the basic structure of the game looks like:</p>

<pre><code>{
    makeBoard();

    System.out.println("Choose 0 - 5 to pick which column to drop your piece!");
    System.out.println("R is red and Y is yellow.");
    System.out.println("Player 1, you are red. Player 2, you are yellow.");
    System.out.println("Good luck!");

    printBoard();

    boolean flag = true;

    while(flag)
    {
        dropRed();
        printBoard();

        if(!redCheck())
        {
            flag = false;
            break;
        } //check r


        dropYellow();
        printBoard();


        if(!yellowCheck())
        {
            flag = false;
            break;
        } //check y

    } // closes while
</code></pre>

<p>Any guidance is appreciated, and just let me know if you would like to see more of the code, thank you!</p>