From 1ef66c962a1cea81dee4f5db32cd011feac7de44 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 17 Jun 2018 08:10:54 +0900 Subject: reversi :white_flower: :100: --- .../app/common/scripts/streaming/othello-game.ts | 11 -------- src/client/app/common/scripts/streaming/othello.ts | 31 ---------------------- .../app/common/scripts/streaming/reversi-game.ts | 11 ++++++++ src/client/app/common/scripts/streaming/reversi.ts | 31 ++++++++++++++++++++++ 4 files changed, 42 insertions(+), 42 deletions(-) delete mode 100644 src/client/app/common/scripts/streaming/othello-game.ts delete mode 100644 src/client/app/common/scripts/streaming/othello.ts create mode 100644 src/client/app/common/scripts/streaming/reversi-game.ts create mode 100644 src/client/app/common/scripts/streaming/reversi.ts (limited to 'src/client/app/common/scripts/streaming') diff --git a/src/client/app/common/scripts/streaming/othello-game.ts b/src/client/app/common/scripts/streaming/othello-game.ts deleted file mode 100644 index 9e36f647bb..0000000000 --- a/src/client/app/common/scripts/streaming/othello-game.ts +++ /dev/null @@ -1,11 +0,0 @@ -import Stream from './stream'; -import MiOS from '../../../mios'; - -export class OthelloGameStream extends Stream { - constructor(os: MiOS, me, game) { - super(os, 'othello-game', { - i: me ? me.token : null, - game: game.id - }); - } -} diff --git a/src/client/app/common/scripts/streaming/othello.ts b/src/client/app/common/scripts/streaming/othello.ts deleted file mode 100644 index 8f4f217e39..0000000000 --- a/src/client/app/common/scripts/streaming/othello.ts +++ /dev/null @@ -1,31 +0,0 @@ -import StreamManager from './stream-manager'; -import Stream from './stream'; -import MiOS from '../../../mios'; - -export class OthelloStream extends Stream { - constructor(os: MiOS, me) { - super(os, 'othello', { - i: me.token - }); - } -} - -export class OthelloStreamManager extends StreamManager { - private me; - private os: MiOS; - - constructor(os: MiOS, me) { - super(); - - this.me = me; - this.os = os; - } - - public getConnection() { - if (this.connection == null) { - this.connection = new OthelloStream(this.os, this.me); - } - - return this.connection; - } -} diff --git a/src/client/app/common/scripts/streaming/reversi-game.ts b/src/client/app/common/scripts/streaming/reversi-game.ts new file mode 100644 index 0000000000..5638b3013f --- /dev/null +++ b/src/client/app/common/scripts/streaming/reversi-game.ts @@ -0,0 +1,11 @@ +import Stream from './stream'; +import MiOS from '../../../mios'; + +export class ReversiGameStream extends Stream { + constructor(os: MiOS, me, game) { + super(os, 'reversi-game', { + i: me ? me.token : null, + game: game.id + }); + } +} diff --git a/src/client/app/common/scripts/streaming/reversi.ts b/src/client/app/common/scripts/streaming/reversi.ts new file mode 100644 index 0000000000..2e4395f0f1 --- /dev/null +++ b/src/client/app/common/scripts/streaming/reversi.ts @@ -0,0 +1,31 @@ +import StreamManager from './stream-manager'; +import Stream from './stream'; +import MiOS from '../../../mios'; + +export class ReversiStream extends Stream { + constructor(os: MiOS, me) { + super(os, 'reversi', { + i: me.token + }); + } +} + +export class ReversiStreamManager extends StreamManager { + private me; + private os: MiOS; + + constructor(os: MiOS, me) { + super(); + + this.me = me; + this.os = os; + } + + public getConnection() { + if (this.connection == null) { + this.connection = new ReversiStream(this.os, this.me); + } + + return this.connection; + } +} -- cgit v1.2.3-freya