- Introduction
- Game Rules
- Setup
- Building Process
- Conclusion
Tic-Tac-Toe is a simple two-player game played on a 3x3 grid. The game is also known as Noughts and Crosses. The objective of the game is to place three marks in a row, either horizontally, vertically, or diagonally.
- The game is played on a 3x3 grid.
- One player is X, and the other player is O.
- X always starts first.
- Who wins the game is the first player to start the next round.
- Players take turns placing their marks on an empty square.
- The first player to get three marks in a row wins the game.
- If all squares are filled and no player has won, the game is a draw.
Node environment should be installed on your machine. If not, you can download it from https://nodejs.org/en/download/. Better to use the latest version.
- Clone the repository:
git clone https://github.com/wwJavid/game - Install dependencies
npm i - Run
npm run buildto build the project - Run
npm run devto start the server
- Sketching UI
- Defining guidelines
- Branding
- Future improvements
- References
After reading the requirements, I started to make sketches to visualize the layout and interface of the game. I sketched out possible designs for the game board, player markers, buttons for starting a new game, and displaying the game's status.
In order to create branding for the game, I based upon design system of Monese. I got logo from Monese Media Pack and used it according to brand guidelines. More comprehensive information is acquired from Joe Alisson's design sytem work for Monese.
I followed React’s 5 principles regarding app building alongside Airbnb and BEM style conventions.
Steps I followed:
Step 1: Breaking the UI into a component hierarchy
Step 2: Building a static version
Step 3: Finding the minimal but complete representation of UI state
Step 4: Identifying where states should live
Step 5: Adding global state management
- Static image format should be replaced with SVG for performance boost.
- Semantic HTML elements should be improved
- Form validation should be improved.
- Responsive design should be implemented.
- Accessibility should be met.
- Following Container/Presentational pattern for larger components.
- Storing game data in indexedDB web storage.
https://joeallison.co.uk/monesedesignsystem.html
I enjoyed building the game. Hope you enjoy while playing it. Enjoy!