Welcome to the Tic Tac Toe game assignment! This project is focused on developing a classic Tic Tac Toe game using vanilla JavaScript. The main goals are to build a functional game and emphasize best coding practices, including the use of plain JavaScript and the separation of concerns.
Tic Tac Toe is a two-player game where each player takes turns marking a space in a 3x3 grid. The aim is to place three marks in a row, either horizontally, vertically, or diagonally.
- 3x3 grid.
- Players use 'X' or 'O' marks.
- Three marks in a line to win.
- A draw if all squares are filled without a win.
- Option to restart the game.
Using plain JavaScript, without third-party libraries:
- Enhances core JavaScript understanding.
- Provides code control.
- Minimizes dependencies.
- Facilitates a fast-loading application.
Ensuring code modularity:
- Components: Isolated UI elements.
- Logic: Specific functions for rules and behavior.
- Styles: Separate visual styling.
- Data Management: Separate game state and player information handling.
Ensuring code reliability:
- Correct rendering.
- Proper user interaction handling.
- Expected output for given inputs.
- Handling edge cases and unexpected inputs.
- Proper interaction with other system parts.
npm install
npm run test -- path-to-your-test
npm run format
Please adhere to the guidelines and test thoroughly to ensure compliance with game conditions and best practices.
For questions or assistance, refer to the documentation.
Happy coding, and may the best Tic Tac Toe player win! Commit to core programming principles and clean code for professional development and growth as a skilled developer.