Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Tabu-Middleware
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dennis Willers
Tabu-Middleware
Commits
1d7fd718
Commit
1d7fd718
authored
Jan 03, 2021
by
Dennis Willers
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete unnessecary code
parent
534553a2
Pipeline
#348
passed with stages
in 3 minutes and 18 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
28 deletions
+0
-28
socket.js
socket.js
+0
-28
No files found.
socket.js
View file @
1d7fd718
...
@@ -10,38 +10,10 @@ Http.listen(3000, () => {
...
@@ -10,38 +10,10 @@ Http.listen(3000, () => {
console
.
log
(
"
Listening at :3000...
"
);
console
.
log
(
"
Listening at :3000...
"
);
});
});
var
position
=
{
x
:
200
,
y
:
200
};
var
currentCard
=
{};
var
currentCard
=
{};
Socketio
.
on
(
"
connection
"
,
socket
=>
{
Socketio
.
on
(
"
connection
"
,
socket
=>
{
console
.
log
(
'
new Socket connect
'
);
console
.
log
(
'
new Socket connect
'
);
socket
.
emit
(
"
position
"
,
position
);
socket
.
on
(
"
move
"
,
data
=>
{
console
.
log
(
'
Data:
'
,
data
);
switch
(
data
)
{
case
"
left
"
:
console
.
log
(
'
left
'
);
position
.
x
-=
5
;
Socketio
.
emit
(
"
position
"
,
position
);
break
;
case
"
right
"
:
position
.
x
+=
5
;
Socketio
.
emit
(
"
position
"
,
position
);
break
;
case
"
up
"
:
position
.
y
-=
5
;
Socketio
.
emit
(
"
position
"
,
position
);
break
;
case
"
down
"
:
position
.
y
+=
5
;
Socketio
.
emit
(
"
position
"
,
position
);
break
;
}
});
for
(
var
key
in
currentCard
)
{
for
(
var
key
in
currentCard
)
{
socket
.
emit
(
key
,
currentCard
[
key
])
socket
.
emit
(
key
,
currentCard
[
key
])
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment