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
- Host: GitHub
- URL: https://github.com/beyondmayowo/tic-tac-toe
- Owner: beyondmayOwO
- Created: 2024-03-01T16:38:50.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-15T09:23:51.000Z (almost 2 years ago)
- Last Synced: 2025-01-11T06:45:40.713Z (about 1 year ago)
- Topics: factory-functions, javascript, module-pattern, tictactoe
- Language: JavaScript
- Homepage: https://tictactoehere.netlify.app/
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.