TIC TAC TOE INSTRUCTIONS:
Objective: The game is played on a 3 x 3 grid. The goal is to be the first player to get three of your symbols in a row (horizontally, vertically, or diagonally)
Players: Tic Tac Toe is typically played by two players, one representing "X", and one representing "O"
Gameplay: Players alternate turns, placing one symbol on each turn. Once a symbol is placed in a square, it cannot be moved.
Winning: The game continues until one player gets all 3 of their symbols, or until all 9 squares are filled without a winner, resulting in a draw.
Declaring the Winner: When a player achieves three in a row, they announce their victory by saying "Tic tac toe!" or simply stating that they have won.
I created this project to strengthen my understanding of game development and the idea of players being able to interact with my project. Building a game that I was familiar with and something that most people know how to play and have fun. It uses logic, creative elements, and interactionn
This project was built from HTML, CSS, and JavaScript.
- HTML created the main structure of the game board and the layout.
- CSS was used for the styling such as the colors and buttons. It was used to create the grid layout.
- JavaScript handled the game logic. This includes tracking player turns, keeping count of the spots taken on the grid, detecting ties, resetting the game, and displaying the game results at the end..
Challenges: A few challenges that faced when coding this was trying to debug it and not know which part was wrong. Especially when it came to checking the win logic efficiently and making sure I considered all the possible winning combinations I had to also consider different scenarios that are not in the game such as clicking on the same box twice by a player. Also being able to track the game correctly.tly.
What I learned:
- How to use the event listeners and fix small bugs/debug code.
- Importance of clean code and using comments along the way so it doesn't confuse me as well as others.
- Even one line of code can make a huge difference in the overall display of the game
- I became better at game design and creating a layout format of the game.