This is the classic Tic Tac Toe game that we all know, but perhaps you never heard of it, in that case, you can do some research here. This game was written in JavaScript, making use of concepts like factory functions and modules.
Now comes a listing of the features that we, the developers, think this project has, and, as a high-level overview of the working application, we also have this demonstration recording.
This subset holds features that can be recognized by any person, no need to know about tech subjects.
- Tracking of the current player
- Parsing of the game board every turn
- Win and draw scenarios handling
This subset, on the contrary, depicts the features that probably only developers can understand.
- webpack usage
- Bootstrap loading using webpack
- CSS bundling into JS also using webpack
- Modularization of the code
- Install node, you can see how to do it here.
- Clone the repository, the command is:
git clone https://github.com/mrnadaara/Tic-Tac-Toe-JS.git
- Install the project dependencies, you can do so with the following:
npm install
And that's about it, you need to know that after changing anything inside the src
folder you need to rebuild the bundle (the file dist/main.js
), you can achieve that using this:
npx webpack
Or, because we already added a build
script to the package.json
file, you can use:
npm run build
This project uses JEST to run tests. A test folder containing all tests has already been made. You can
run them by typing npm test
in your respective terminals.
The conditions tested includes:
- Which player wins
- Whether a certain condition is met such as a win or draw
- How the player wins, check whether it was by column, row or diagonal
- Checks whether the game needs to continue, is there any slots available?
This project was developed by mrnadaara and santiago-rodrig.
This project is licensed under the MIT license.