Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
2 Player Pong built using a node socket server
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
server
socket
README.rtf

README.rtf

{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf340
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\margl1440\margr1440\vieww10800\viewh8400\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural

\f0\fs24 \cf0 Note: Before starting the game, make sure that neither of player1.html, player2.html, or index.html are open. Also, socketserver.js should be restarted every time the game is run to make sure the game starts on both logins. \
\
Instructions: \
\
Replace the IP address in each of the files (index.html, player1.html, player2.html, pong.js) to your IP address (Search :3000 in your project to make this easier).\
\
From the hw7 root directory, follow this in order:\
\
On the command line: \
\
In hw7/socketserver:\
- Run 'node socketserver.js'\
\
In hw7/server\
- Run 'node server/server.js'\
\
In a browser: \
\
- Open localhost:8889/www/index.html \
\
On a mobile device: \
- Open localhost:8889/www/player1.html on one\
- Open localhost:8889/www/player2.html on another\
\
Log in on both devices: \
username: bob\
password: secret\
\
The game ends when the either player wins 20 points}
Something went wrong with that request. Please try again.