https://github.com/roppa/tictactoe
Tic tac toe game
https://github.com/roppa/tictactoe
Last synced: about 1 year ago
JSON representation
Tic tac toe game
- Host: GitHub
- URL: https://github.com/roppa/tictactoe
- Owner: roppa
- Created: 2015-03-25T20:23:27.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-04-05T11:49:12.000Z (about 11 years ago)
- Last Synced: 2025-02-14T18:36:27.376Z (over 1 year ago)
- Language: JavaScript
- Size: 160 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
#Tic-tac-toe
Ah, remember war games. This was a lunch time challenge at work. Lots of ways to solve it actually. Just uses console. We assume there is only two users "x" and "o". The matrix runs from 0 - 8, representing three rows going left to right.
```
tictactoe.choose(0);
```
To reset, just:
```
tictactoe.newGame();
```