Tic Tac Toe

I created a Tic Tac Toe game in Java (with some help from AI) to practice building a GUI and writing the game logic. The game lets you play as X against the computer (O), keeps track of turns, checks for a winner or a draw, and shows messages when the game ends.

I worked on the interface using Java Swing. I made sure players couldn’t pick a square that was already taken, and added checks for wins across rows, columns, and diagonals, as well as detecting a draw when the board is full.

I had fun customizing the game and seeing it all come together. It also helped me get better at debugging, and I plan to make more projects like this in my free time.

Source: See the code here