import { Command } from "@colyseus/command"; import { CardGameState } from "../schema/CardGameState"; import {ChildAsyncCommand} from "./ChildAsyncCommand"; export class EnqueueAsyncCommand extends Command { async execute({ count }: {count: number}) { this.state.round = 0; return [...Array(count)].map(_ => new ChildAsyncCommand().setPayload({ i: count })); } }