Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tokisuno/tictactoe
https://github.com/tokisuno/tictactoe
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/tokisuno/tictactoe
- Owner: tokisuno
- Created: 2024-07-24T12:55:06.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-07-30T17:00:36.000Z (5 months ago)
- Last Synced: 2024-07-30T23:54:42.544Z (5 months ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Tic-Tac-Toe (in js)
## Post-project review
I think in the beginning I was using factories but got really confused and resorted to only using objects and constructors. It's not very elegant but it is functional and looks pretty decent. Feedback appreciated!## Project
1. You are going to store the gameboard as an array inside of a Gameboard object.
2. Your players are going to be stored in objects.
3. You are probably going to want an object to control the flow of the game itself.* Objective
- Use functional scoping and closures
- Have a working and nice looking tic-tac-toe clone
- Write as little global code as possible
* Tuck everything inside factories* Hints
- If you only need a single instance of *something* then wrap the factory inside a module pattern so it cannot be reused to create additional instances.
* (i.e. gameboard, displayController, etc...)