Card could be mistakenly drawn to the opponent and stop the multiplayer game
tomchen opened this issue · comments
Tom Chen commented
In high latency connection, if multiple actions are pulled and executed together (because early instruction arrives late), the said problem could sometimes happen.
Maybe not related to #27, but to be investigated.
Samples:
// pulled (executed):
[
{
kind: "INST",
data: { type: "DRAW_CARD_TO_QUEUE", n: 47 },
seq: 47,
gameNumber: 1619018788722,
},
{
kind: "INST",
data: {
type: "PLAY_CARD_TO_QUEUE",
payload: {
type: "USE_CARD_CORE",
n: 4,
index: 3,
position: 3,
owner: "opponent",
},
},
seq: 48,
gameNumber: 1619018788722,
},
{
kind: "INST",
data: { type: "DRAW_CARD_TO_QUEUE", n: 62 },
seq: 49,
gameNumber: 1619018788722,
},
];
// pulled (executed):
[
{
kind: "INST",
data: {
type: "PLAY_CARD_TO_QUEUE",
payload: {
type: "DISCARD_CARD_CORE",
index: 16,
position: 3,
owner: "opponent",
},
},
seq: 119,
gameNumber: 1619026552609,
},
{
kind: "INST",
data: { type: "DRAW_CARD_TO_QUEUE", n: 41 },
seq: 120,
gameNumber: 1619026552609,
},
];