Solve a logical error in Node.js two player tic tac toe game using socket.io
$10-30 USD
Ολοκληρώθηκε
Αναρτήθηκε περίπου 6 χρόνια πριν
$10-30 USD
Πληρωμή κατά την παράδοση
Two player tic tac toe game using node.js socket.io. Project is almost done but cannot solve an error.
Instructions:
1) install node and npm (if you install node the npm will be installed automatically)
2) extract the directory.
3)open a command prompt and go to the directory.
4)to start the server: node [login to view URL] 5050 (in a new command prompt window by going to the folder location)
5)to start both the clients : node [login to view URL] [login to view URL] 5050 ( For each client open a new command prompt window by going to the folder location)
6) When the second client gets connected the message will appear.(You are the first player or you are the second player respectively)
========================================================
To do at your side:
1)the first client is not able to communicate properly with the second client, second client can communicate properly with the first client.>> however the communication logic is same for both the client. You will be able to figure it out by looking at the
code.
2) currently input is taken only single time. Iterate over the loop for 9 times(in tic-tac toe 3*3) so that the input is taken 9 times.
PS : convert the [login to view URL] file to .json file
and [login to view URL] to .js files respectively.
Hi, I've figured out the logical error you mentioned and have a working version of your client/server solution where both clients can successfully communicate with the server and server will forward the messages from client1 to client2 and vice versa.