Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sejong25
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Tear of Sejong
sejong25
Commits
bd3b9a82
Commit
bd3b9a82
authored
Aug 15, 2019
by
18신대성
Committed by
18손재민
Aug 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
한명쯤 로딩 안돼도 2초 뒤에 강제시작하게
parent
745814fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
10 deletions
+7
-10
GameServer.js
GameServer.js
+1
-1
server.js
server.js
+6
-9
No files found.
GameServer.js
View file @
bd3b9a82
...
...
@@ -82,7 +82,7 @@ class GameRoom
{
this
.
roomId
=
GameServer
.
getRoomNumber
();
this
.
roomIndex
=
-
1
;
this
.
startCount
=
3
;
this
.
startCount
=
2
;
this
.
maxPlayer
=
100
;
this
.
nextRank
=
100
;
...
...
server.js
View file @
bd3b9a82
...
...
@@ -106,20 +106,17 @@ io.on('connection', function(socket)
room
.
startTimer
=
setTimeout
(
function
()
{
let
deads
=
room
.
currentPlayer
.
filter
(
element
=>
!
element
.
isAlive
);
if
(
room
.
aliveCount
!=
0
)
if
(
room
.
aliveCount
!=
0
&&
room
.
currentPlayer
.
length
-
deads
.
length
>=
room
.
startCount
)
{
console
.
error
(
'
[ROOM#
'
+
room
.
roomId
+
'
] FORCE START!!!
'
);
if
(
room
.
currentPlayer
.
length
-
deads
.
length
>=
room
.
startCount
)
room
.
startRoom
();
deads
.
forEach
(
function
(
element
)
{
room
.
startRoom
();
deads
.
forEach
(
function
(
element
)
{
element
.
defeat
();
});
}
element
.
defeat
();
});
clearTimeout
(
room
.
startTimer
);
}
else
else
if
(
deads
.
length
>
0
)
{
deads
.
forEach
(
function
(
element
)
{
...
...
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