From 45ee732828e2c2722ff6deddf9c6b24897c572a8 Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 24 Mar 2021 17:49:29 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=BA=E5=99=A8?= =?UTF-8?q?=E4=BA=BA=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/robot/Robot.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/robot/Robot.ts b/src/robot/Robot.ts index 3de4af9..8e0edfc 100644 --- a/src/robot/Robot.ts +++ b/src/robot/Robot.ts @@ -61,6 +61,7 @@ export class Robot { // if (data.player == self.sessionId) { // self.cards = self.cards.concat(data.cards); // } + debug(`($${ self.sessionId })draw_card_s2c: ${data}`) break case 'player_ready_s2c': break From 5b2a3b6d954b00497f8235ee29ccb7de13fe1075 Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 24 Mar 2021 17:52:41 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=BA=E5=99=A8?= =?UTF-8?q?=E4=BA=BA=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/robot/Robot.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/robot/Robot.ts b/src/robot/Robot.ts index 8e0edfc..bff69b9 100644 --- a/src/robot/Robot.ts +++ b/src/robot/Robot.ts @@ -61,7 +61,7 @@ export class Robot { // if (data.player == self.sessionId) { // self.cards = self.cards.concat(data.cards); // } - debug(`($${ self.sessionId })draw_card_s2c: ${data}`) + debug(`($${ self.sessionId })draw_card_s2c: ${JSON.stringify(data)}`) break case 'player_ready_s2c': break From 971e025e1dd56469e24ba43144e305671c06f3b0 Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 24 Mar 2021 18:13:04 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=BA=E5=99=A8?= =?UTF-8?q?=E4=BA=BA=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/robot/Robot.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/robot/Robot.ts b/src/robot/Robot.ts index bff69b9..3d33a2c 100644 --- a/src/robot/Robot.ts +++ b/src/robot/Robot.ts @@ -63,6 +63,12 @@ export class Robot { // } debug(`($${ self.sessionId })draw_card_s2c: ${JSON.stringify(data)}`) break + case 'discard_card_s2c': + // if (data.player == self.sessionId) { + // self.cards = self.cards.concat(data.cards); + // } + debug(`($${ self.sessionId })discard_card_s2c: ${JSON.stringify(data)}`) + break case 'player_ready_s2c': break case 'eat_card_s2c': From a45e0665b5a070add421ba810fddbdfa14bdba5e Mon Sep 17 00:00:00 2001 From: zhl Date: Wed, 24 Mar 2021 18:26:04 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9C=BA=E5=99=A8?= =?UTF-8?q?=E4=BA=BA=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/robot/Robot.ts | 2 +- src/rooms/commands/DiscardCommand.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/robot/Robot.ts b/src/robot/Robot.ts index 3d33a2c..bcf7356 100644 --- a/src/robot/Robot.ts +++ b/src/robot/Robot.ts @@ -61,7 +61,7 @@ export class Robot { // if (data.player == self.sessionId) { // self.cards = self.cards.concat(data.cards); // } - debug(`($${ self.sessionId })draw_card_s2c: ${JSON.stringify(data)}`) + // debug(`($${ self.sessionId })draw_card_s2c: ${JSON.stringify(data)}`) break case 'discard_card_s2c': // if (data.player == self.sessionId) { diff --git a/src/rooms/commands/DiscardCommand.ts b/src/rooms/commands/DiscardCommand.ts index 87f5f46..0a2d1b1 100644 --- a/src/rooms/commands/DiscardCommand.ts +++ b/src/rooms/commands/DiscardCommand.ts @@ -95,6 +95,9 @@ export class DiscardCommand extends Command