This is with 3 * 3 board and it can be scaled without adding logic by changing board size.
This is performed using Test Driven Development (TDD).
The rules are described below :
- X always goes first.
- Players cannot play on a played position.
- Players alternate placing X’s and O’s on the board until either:
- One player has three in a row, horizontally, vertically or diagonally
- All nine squares are filled.
- If a player is able to draw three X’s or three O’s in a row, that player wins.
- If all nine squares are filled and neither player has three in a row, the game is a draw.
Inside this project, you can run some built-in commands:
Runs the app in development mode.
Open http://localhost:9000 to view it in the browser.
Runs the test.
Inspired from Udacity
- chore: updating build tasks, package manager configs, initial commit, etc.. no production code change
- docs: changes to documentation (Readme file)
- feat: a new feature with test case
- fix: a bug fix
- style: formatting, missing semi colons, etc.. no code change
- refactor: refactoring production code
- test: Refactoring test; no production code change