Tic-Tac-Toe
A multipler tic-tac-toe built with AdonisJS Websockets. A matching tutorial to this repo can be found here.
Table of Content
Requirements
This project requires local installations of the following
Installation
Step 1: Clone the repo
git clone https://github.com/vicradon/tic-tac-toe
Step 2: Install dependencies
$ npm i
Step 3: Start the Redis server
$ redis-server
Step 3: In another terminal, start the Adonis server
$ adonis serve --dev
Project Architecture
Controllers
The controllers contain the bulk of the business logic of the app.
- The GameController.js deals with game initialization and rendering the game view
- The UserController.js deals with setting and resetting usernames
- The TicTacToeController.js is a web socket controller that deals with the game state, logic and rounds.
Frontend
The project follows an MVC architecture. Views are written using Adonis edge. The project uses pure javascript and bootstrap 5.
Contributing
Feel free to open an issue if you notice any error in the code.
Licence
This repo is licenced under the MIT Licence. Copyright © 2021, Osinachi Chukwujama