mirror of
https://github.com/misskey-dev/misskey.git
synced 2025-01-11 01:00:07 +09:00
wip
This commit is contained in:
parent
7794e7ae2f
commit
fbad40bb9b
@ -165,7 +165,7 @@ export interface ReversiEventTypes {
|
|||||||
game: Packed<'ReversiGame'>;
|
game: Packed<'ReversiGame'>;
|
||||||
};
|
};
|
||||||
invited: {
|
invited: {
|
||||||
game: Packed<'ReversiGame'>;
|
game: Packed<'ReversiMatching'>;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -89,10 +89,6 @@ export class ReversiService implements OnApplicationShutdown, OnModuleInit {
|
|||||||
const packed = await this.reversiGameEntityService.pack(game, { id: exist.parentId });
|
const packed = await this.reversiGameEntityService.pack(game, { id: exist.parentId });
|
||||||
this.globalEventService.publishReversiStream(exist.parentId, 'matched', { game: packed });
|
this.globalEventService.publishReversiStream(exist.parentId, 'matched', { game: packed });
|
||||||
|
|
||||||
const other = await this.reversiMatchingsRepository.countBy({
|
|
||||||
childId: me.id,
|
|
||||||
});
|
|
||||||
|
|
||||||
return game;
|
return game;
|
||||||
} else {
|
} else {
|
||||||
const child = targetUser;
|
const child = targetUser;
|
||||||
@ -168,9 +164,9 @@ export class ReversiService implements OnApplicationShutdown, OnModuleInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getRandomMap() {
|
function getRandomMap() {
|
||||||
const mapCount = Object.entries(maps).length;
|
const mapCount = Object.entries(Reversi.maps).length;
|
||||||
const rnd = Math.floor(Math.random() * mapCount);
|
const rnd = Math.floor(Math.random() * mapCount);
|
||||||
return Object.values(maps)[rnd].data;
|
return Object.values(Reversi.maps)[rnd].data;
|
||||||
}
|
}
|
||||||
|
|
||||||
const map = freshGame.map != null ? freshGame.map : getRandomMap();
|
const map = freshGame.map != null ? freshGame.map : getRandomMap();
|
||||||
|
Loading…
Reference in New Issue
Block a user