Inspiration
I have had some past experience with Java and wanted to make a game. So, I put two and two together and made a Tic-Tac-Toe game.
How it works
The program was simple. It used an array to check valid placement of X's or O's against the already-recorded turn, and a win-check was called every turn using this array. A series of string variables existed to give the player a visual, which was constantly updated along with the array. To make its turn, the computer just generated a random number, which was translated to a grid location, and placed an O if it wasn't occupied. If it was, it would just generate another number and iterate through the loop until it picked one that wasn't.
Challenges I ran into
In the absolute worst stroke of luck possible, my graphics driver crashed, at 11:55. The program was nearly done, but I hadn't saved for about 150 lines of code--90% of the program... and I tried to CTRL + ALT + DEL instead of CTRL + S.
Accomplishments that I'm proud of
Almost making a working tic-tac-toe game...
What I learned
SAVE YOUR WORK AS OFTEN AS POSSIBLE. CTRL + S BEFORE CTRL + ALT + DEL
What's next for Java Tic-Tac-Toe
A funeral. Rest in peace...
Log in or sign up for Devpost to join the conversation.