✌️
This commit is contained in:
parent
85df5ce3f7
commit
0fb52ea7eb
4 changed files with 8 additions and 3 deletions
|
|
@ -3,7 +3,7 @@ import Stream from './stream';
|
|||
export class OthelloGameStream extends Stream {
|
||||
constructor(me, game) {
|
||||
super('othello-game', {
|
||||
i: me.token,
|
||||
i: me ? me.token : null,
|
||||
game: game.id
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ export default Vue.extend({
|
|||
|
||||
computed: {
|
||||
iAmPlayer(): boolean {
|
||||
if (!(this as any).os.isSignedIn) return false;
|
||||
return this.game.user1_id == (this as any).os.i.id || this.game.user2_id == (this as any).os.i.id;
|
||||
},
|
||||
myColor(): Color {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue