import { Command } from "@colyseus/command"; import { CardGameState } from "../schema/CardGameState"; export class DeepAsync extends Command { async execute() { this.state.i = 0; return [new DeepOneAsync(), new DeepOneAsync()]; } } export class DeepOneAsync extends Command { async execute() { await this.delay(100); this.state.i += 1; return [new DeepTwoAsync()]; } } export class DeepTwoAsync extends Command { async execute() { await this.delay(100); this.state.i += 10; return [new DeepThreeAsync()]; } } export class DeepThreeAsync extends Command { async execute() { await this.delay(100); this.state.i += 100; } }