From f927585245cbbf250bc91f395112ec5ad93f253e Mon Sep 17 00:00:00 2001 From: zinat Date: Wed, 3 Nov 2021 20:47:32 -0400 Subject: [PATCH] commit with vscode reza --- client.js | 22 ++++++++++++++++++++++ play.js | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 client.js diff --git a/client.js b/client.js new file mode 100644 index 0000000..d8b994d --- /dev/null +++ b/client.js @@ -0,0 +1,22 @@ +const connect = () => { + const conn = net.createConnection({ + host: 'localhost', + port: 50541 + }) + // interpret incoming data as text + conn.setEncoding("utf8"); + conn.on('data', (data) => { + console.log(data); + }) + + return conn; + }; + const reza = () => {return { + name : 'reza', + age: 32 + }} + + module.exports = { + connect : connect, + reza : reza + } \ No newline at end of file diff --git a/play.js b/play.js index b2fac87..4e1292e 100644 --- a/play.js +++ b/play.js @@ -9,3 +9,5 @@ const game = new Game(new UserInterface(), new RemoteInterface()) // Begin game game.start() + +