An open API service indexing awesome lists of open source software.

https://github.com/beyondmayowo/tic-tac-toe

tic-tac-toe game where two players can play on the board
https://github.com/beyondmayowo/tic-tac-toe

factory-functions javascript module-pattern tictactoe

Last synced: 12 months ago
JSON representation

tic-tac-toe game where two players can play on the board

Awesome Lists containing this project

README

          

# tic-tac-toe

Live Preview | How I worked on this project

This is a tic-tac-toe game where two players can play on the board.

## How to play

- Put the names in the input boxes
- Click 'Start'
- A welcome text will pop up
- You can close it by clicking 'x'
- You can now start marking on the board
- Mark on the board until the result text pop ups
- Click on 'Restart' to restart the game

## What I learned

- Using factory functions instead of object constructors

- Wrapping the factory inside an IIFE (module pattern)
For example, I put the codes inside the 'Game' module, making it little to no global code.