Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
srvpro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
srvpro
Commits
ae8ee1a4
Commit
ae8ee1a4
authored
May 25, 2016
by
mercury233
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clean code
parent
a0863d1f
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
88 additions
and
344 deletions
+88
-344
ygopro-server.coffee
ygopro-server.coffee
+28
-167
ygopro-server.js
ygopro-server.js
+25
-164
ygopro.coffee
ygopro.coffee
+22
-13
ygopro.js
ygopro.js
+13
-0
No files found.
ygopro-server.coffee
View file @
ae8ee1a4
This diff is collapsed.
Click to expand it.
ygopro-server.js
View file @
ae8ee1a4
This diff is collapsed.
Click to expand it.
ygopro.coffee
View file @
ae8ee1a4
_
=
require
'underscore'
_
.
str
=
require
'underscore.string'
_
.
mixin
(
_
.
str
.
exports
())
;
_
.
mixin
(
_
.
str
.
exports
())
Struct
=
require
(
'struct'
).
Struct
...
...
@@ -137,17 +137,26 @@ for name, declaration of structs_declaration
console
.
log
"err stoc_send_hint_card_to_room"
return
for
client
in
room
.
players
@
stoc_send
client
,
'GAME_MSG'
,{
curmsg
:
2
,
type
:
10
,
player
:
0
,
data
:
card
}
if
client
@
stoc_send
client
,
'GAME_MSG'
,
{
curmsg
:
2
,
type
:
10
,
player
:
0
,
data
:
card
}
if
client
for
client
in
room
.
watchers
@
stoc_send
client
,
'GAME_MSG'
,{
curmsg
:
2
,
type
:
10
,
player
:
0
,
data
:
card
}
if
client
@
stoc_send
client
,
'GAME_MSG'
,
{
curmsg
:
2
,
type
:
10
,
player
:
0
,
data
:
card
}
if
client
return
@
stoc_die
=
(
client
,
msg
)
->
@
stoc_send_chat
(
client
,
msg
,
@
constants
.
COLORS
.
RED
)
@
stoc_send
client
,
'ERROR_MSG'
,
{
msg
:
1
code
:
2
}
if
client
client
.
end
()
if
client
return
\ No newline at end of file
ygopro.js
View file @
ae8ee1a4
...
...
@@ -245,4 +245,17 @@
}
};
this
.
stoc_die
=
function
(
client
,
msg
)
{
this
.
stoc_send_chat
(
client
,
msg
,
this
.
constants
.
COLORS
.
RED
);
if
(
client
)
{
this
.
stoc_send
(
client
,
'
ERROR_MSG
'
,
{
msg
:
1
,
code
:
2
});
}
if
(
client
)
{
client
.
end
();
}
};
}).
call
(
this
);
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