Inspiration
My inspiration for this project came from my Programming Principles class where we were required to make a final project incorporating everything we have learned in the class so far.
What it does
Tic Tac Toe game code is a console-based representation of the 4x4 game board where two players ('X' and 'O') take turns. The current player is prompted by the program to enter their action by entering the row and column. Every move updates the board, which is represented. The game goes on until one person makes a winning combination that is either horizontal, vertical, or diagonal, or until the board is filled up and results in a tie. The output creates an engaging and easy-to-use experience by giving precise visual information on the game's progress and displaying a win or draw. Overall, the result successfully implements the Tic Tac Toe game, following the guidelines and offering an eye-catching representation of gaming.
How I built it
- Used a 2D array to represent the Tic Tac Toe board.
- Widely Used conditional statements to validate input, check win conditions, and identify ties to guarantee that player movements and game outcomes were accurate.
- Used functions to achieve structuring, which improved the understanding and reliability of the code.
- Frequent testing and continuous development improved the logic and playing experience of the game.
Challenges I ran into
- It was challenging to validate user input since it needed to be carefully checked to make sure the input was inside the board's limits and that certain cells were empty.
- The win-and-tie logic had to be carefully constructed, taking into account every possible combination of rows, columns, and diagonals.
- Achieving a visually appealing and user-friendly presentation required incremental revisions to balance simplicity and aesthetics in the console output.
Accomplishments that I'm proud of
Getting a 100/100
What I learned
This project helped me:
- In implementing fundamental programming constructs such as loops, conditionals, and functions.
- Understand array manipulation and indexing.
- Practice input handling and error checking.
- Basics of game development, including game loops and player interaction. ## What's next for TICTACTOE I want to adapt the game for mobile platforms using frameworks like React Native, Flutter, or Xamarin.
Log in or sign up for Devpost to join the conversation.