-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee7b72d
commit 7566e06
Showing
1 changed file
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,37 @@ | ||
# socket-io-tictactoe | ||
A simple console based TicTacToe game. | ||
|
||
## Install required node modules: | ||
- npm install | ||
|
||
## How to run the code? | ||
### First, start the server: | ||
|
||
- npm start | ||
|
||
### Start clients one by one like below: | ||
|
||
- npm run client1-test | ||
- npm run client1-test | ||
|
||
Remember: Open each of the clients in a seperate command / bash terminal | ||
|
||
## User Inputs / Outputs: | ||
- All the inputs and outputs will be in only client command / bash terminal. | ||
- Server termnal outputs verbose related to player / client and game move activity. | ||
- Client terminal takes one move input at a time, ranging from 1 to 9. | ||
- Client terminal outputs tic-tac-toe game board after each player move. | ||
|
||
### Example Input / Output: | ||
#### Input: | ||
\> 5 | ||
#### Output: | ||
... <br /> | ||
.x. <br /> | ||
... <br /> | ||
|
||
## Game Design: | ||
### Game Server: | ||
- A socket.io based server responsible for listening to player events, managing players and game rooms, handling game logic. | ||
### Clients: | ||
- A socket.io-client based client responsible for sending player moves, events to server and listening game results from server. |