Commit 746de906 authored by 18신대성's avatar 18신대성

페이즈 변경조건 수정

parent e1bc4116
...@@ -264,13 +264,17 @@ class GameRoom ...@@ -264,13 +264,17 @@ class GameRoom
console.table(this.currentPlayer); console.table(this.currentPlayer);
this.announceToRoom('startGame'); this.announceToRoom('startGame');
this.startTime = Date.now(); this.startTime = Date.now();
setTimeout(function()
{
checkPhase(Date.now());
}, 6000);
} }
checkPhase(checkTime) checkPhase(checkTime)
{ {
if (this.currentPhase === GameServer.Phase.START) if (this.currentPhase === GameServer.Phase.START)
{ {
if (this.phaseChanger < 0 && checkTime - this.startTime > 1000) if (checkTime - this.startTime > 6000)
{ {
this.currentPhase = GameServer.Phase.MAIN; this.currentPhase = GameServer.Phase.MAIN;
this.rateArrangePoint = 150; this.rateArrangePoint = 150;
...@@ -289,7 +293,7 @@ class GameRoom ...@@ -289,7 +293,7 @@ class GameRoom
} }
else if (this.currentPhase === GameServer.Phase.MAIN) else if (this.currentPhase === GameServer.Phase.MAIN)
{ {
let playerLimit = Math.min(Math.round(this.currentPlayer.length / 5), 3); let playerLimit = Math.max(Math.round(this.currentPlayer.length / 5), 3);
if (this.aliveCount <= playerLimit) if (this.aliveCount <= playerLimit)
{ {
this.currentPhase = GameServer.Phase.MUSIC; this.currentPhase = GameServer.Phase.MUSIC;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment