From 161fd4afab323ca6bf491def473f84bb7557b481 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 7 Mar 2018 17:48:32 +0900 Subject: wip --- src/web/app/common/scripts/streaming/othello.ts | 28 +++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/web/app/common/scripts/streaming/othello.ts (limited to 'src/web/app/common/scripts/streaming/othello.ts') diff --git a/src/web/app/common/scripts/streaming/othello.ts b/src/web/app/common/scripts/streaming/othello.ts new file mode 100644 index 0000000000..febc5d498a --- /dev/null +++ b/src/web/app/common/scripts/streaming/othello.ts @@ -0,0 +1,28 @@ +import StreamManager from './stream-manager'; +import Stream from './stream'; + +export class OthelloStream extends Stream { + constructor(me) { + super('othello', { + i: me.token + }); + } +} + +export class OthelloStreamManager extends StreamManager { + private me; + + constructor(me) { + super(); + + this.me = me; + } + + public getConnection() { + if (this.connection == null) { + this.connection = new OthelloStream(this.me); + } + + return this.connection; + } +} -- cgit v1.2.3-freya