The exercised has been solved. Go to Solution Doc to read the details.
Your goal is to provide a MVP (minimum valuable product) of the classic tic-tac-toe game. The game should include:
- a working 3x3 grid to interact with
- a way to know who's turn is next ("O" or "X")
- a way to know the game result (if there's any winner or if it's a tie)
- a way to restart the game
The game consists of a 3x3 grid in which each a player (X and O) puts a mark into a blank slot. The players goal is to connect 3 of their own’s mark in line (row, column or diagonal).
You should only use standard JavaScript, HTML5 and CSS3 code/tags only.
The solution should be accessible by doing npm start only
- Architecture
- OOP
- Code style
- Useful comments
- Code complexity
- Commits scope and messages
- Responsive, clean and neat Interface and interactions
- Accessibility: keyboard interactions, assistive technologies, aria-labels, etc
- Ability to replay the last finished game
- Ability to play against the Machine
- Work with an NxN board
- Propose unit test cases, approaches, how would you mock data, etc. A markdown talkative file is good enough.
- run
npm installand go for a coffee or a mate - run
npm startand start coding!
index.js contains a boilerplate class and constructor but feel free to code as whatever you see fit.