Merge branch 'master' of http://git.kingsome.cn/node/card_svr
This commit is contained in:
commit
3ec1883d29
@ -8,7 +8,7 @@
|
|||||||
"start": "ts-node-dev --inspect --files src/index.ts",
|
"start": "ts-node-dev --inspect --files src/index.ts",
|
||||||
"debug": "node --require ts-node/register --inspect src/index.ts",
|
"debug": "node --require ts-node/register --inspect src/index.ts",
|
||||||
"dev": "DEBUG=colyseus:*,jc:* node --require ts-node/register --inspect src/index.ts",
|
"dev": "DEBUG=colyseus:*,jc:* node --require ts-node/register --inspect src/index.ts",
|
||||||
"dev:less": "DEBUG=colyseus:command,jc:* node --require ts-node/register --inspect src/index.ts",
|
"dev:less": "DEBUG=colyseus:command,jc:* node --require ts-node/register --inspect=0.0.0.0:9229 src/index.ts",
|
||||||
"loadtest": "colyseus-loadtest loadtest/example.ts --room my_room --numClients 3",
|
"loadtest": "colyseus-loadtest loadtest/example.ts --room my_room --numClients 3",
|
||||||
"test": "echo \"Error: no test specified\" && exit 1"
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
},
|
},
|
||||||
|
@ -65,7 +65,8 @@ Object.defineProperties(Room.prototype, {
|
|||||||
let client = this.getClient(dstplayer);
|
let client = this.getClient(dstplayer);
|
||||||
let sData = {
|
let sData = {
|
||||||
player: dstplayer,
|
player: dstplayer,
|
||||||
cards: cards
|
cards: cards,
|
||||||
|
source: source
|
||||||
};
|
};
|
||||||
this.sDrawCard(client, sData);
|
this.sDrawCard(client, sData);
|
||||||
let cardIds = cards.map(card => card.id);
|
let cardIds = cards.map(card => card.id);
|
||||||
|
@ -47,8 +47,7 @@ export class EatConfirmCommand extends Command<CardGameState, { timeUp: boolean
|
|||||||
if (tmpActionMap.has(pid)) {
|
if (tmpActionMap.has(pid)) {
|
||||||
if (typeof tmpActionMap.get(pid) != 'number') {
|
if (typeof tmpActionMap.get(pid) != 'number') {
|
||||||
player = this.state.players.get(pid);
|
player = this.state.players.get(pid);
|
||||||
// @ts-ignore
|
cards = tmpActionMap.get(pid) as string[];
|
||||||
cards = tmpActionMap.get(pid);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -11,7 +11,6 @@ import {NextTurnCommand} from "./NextTurnCommand";
|
|||||||
export class TurnEndCommand extends Command<CardGameState, {}> {
|
export class TurnEndCommand extends Command<CardGameState, {}> {
|
||||||
|
|
||||||
execute() : Array<Command> | void{
|
execute() : Array<Command> | void{
|
||||||
// @ts-ignore
|
|
||||||
const sessionIds = [...this.state.players.keys()];
|
const sessionIds = [...this.state.players.keys()];
|
||||||
if (this.state.currentTurn) {
|
if (this.state.currentTurn) {
|
||||||
let player = this.state.players.get(this.state.currentTurn);
|
let player = this.state.players.get(this.state.currentTurn);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user