diff --git a/src/rooms/commands/ChildAsyncCommand.ts b/src/rooms/commands/ChildAsyncCommand.ts deleted file mode 100644 index 31be852..0000000 --- a/src/rooms/commands/ChildAsyncCommand.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Command } from "@colyseus/command"; -import { CardGameState } from "../schema/CardGameState"; - -export class ChildAsyncCommand extends Command { - async execute({ i }: {i: number}) { - await new Promise((resolve) => { - setTimeout(() => { - this.state.round += i; - resolve(); - }, 100) - }) - } -} diff --git a/src/rooms/commands/ChildCommand.ts b/src/rooms/commands/ChildCommand.ts deleted file mode 100644 index 19a6146..0000000 --- a/src/rooms/commands/ChildCommand.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Command } from "@colyseus/command"; -import { CardGameState } from "../schema/CardGameState"; - -export class ChildCommand extends Command { - execute({ i }: {i: number}) { - this.state.round += i; - } -} diff --git a/src/rooms/commands/DeepAsync.ts b/src/rooms/commands/DeepAsync.ts deleted file mode 100644 index 10cd0cb..0000000 --- a/src/rooms/commands/DeepAsync.ts +++ /dev/null @@ -1,32 +0,0 @@ -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; - } -} diff --git a/src/rooms/commands/DeepSync.ts b/src/rooms/commands/DeepSync.ts deleted file mode 100644 index 190e5cb..0000000 --- a/src/rooms/commands/DeepSync.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Command } from "@colyseus/command"; -import { CardGameState } from "../schema/CardGameState"; - -export class DeepSync extends Command { - execute() { - this.state.i = 0; - return [new DeepOneSync(), new DeepOneSync()]; - } -} - -export class DeepOneSync extends Command { - execute() { - this.state.i += 1; - return [new DeepTwoSync()]; - } -} - -export class DeepTwoSync extends Command { - execute() { - this.state.i += 10; - return [new DeepThreeSync()]; - } -} - -export class DeepThreeSync extends Command { - execute() { - this.state.i += 100; - } -}