Inspiration
As a child, this was my favorite board game because I was so good at it. I realized that children these days mostly play video and online games, not traditional board games like I used to. So I created this online version of Connect Four so that it would appeal to kids and they would hopefully have the same experience I had.
What it does
It prompts two players to place red and yellow coins on 6 x 7 board. The players keep placing coins until one of them gets four tokens in a row.
How we built it
I created a java class called ConnectFour.java, which contained a constructor for the instance of the class, as well as several methods required to play the game, including a dropRed(), dropYellow(), and checkForWinner() method. We used the Scanner class to be able to get input from the users to play the game.
Challenges we ran into
I ran into several issues, including getting the game board to properly show up on the screen. It turned out to be a simple fix however, with the tweak of an iteration of the for loop. Another issue I ran into was getting the checkForWinner() method to work. It was not recognizing four coins in a row, resulting in an infinite game. I fixed this by making a function called comp, with a restriction that said only two slots that were filled should be compared to see if four coins were in a row.
Accomplishments that we're proud of
I am proud that I was able to come up with a solution for the checkForWinner() method. It took several hours, but I was finally able to write a function that worked when I ran it.
What we learned
I definitely learned to manage my time better and spend less time on coming up with an idea and more on actually executing it. Unfortunately, with all the errors that popped up, I was unable to do any frontend work and make the game look as good as it functions.
What's next for Virtual Connect Four
I want to incorporate some frontend code and color to this game to make it look better. In addition, I wish to virtualize other classic board games in the future.

Log in or sign up for Devpost to join the conversation.