mkchang / tictactoe

command line tic-tac-toe game for two players

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tic-Tac-Toe

A command line tic-tac-toe game for two players.

Basic features

[x] Minimal UI that redraws the board and makes clear whose turn it is, each turn. [x] Players can submit moves (assume, admittedly unrealistically, that both players are sitting at the same keyboard) [x] Win detection - detect and display who won

Bonus / stretch goals

[ ] Structure code such that the UI can be turned easily into a native mobile app (iOS say) without having to rewrite the core game logic [ ] Implement win detection with a functional rather than iterative style [ ] Between moves, rotate the board 90 degrees counter-clockwise. The moves "fall" due to "gravity", post-rotation

Install

npm install

Play

npm start

Take turns entering the integer number for the board position you would like to play.

Test

npm test

About

command line tic-tac-toe game for two players


Languages

Language:JavaScript 100.0%