This commit is contained in:
syuilo
2024-01-29 14:14:00 +09:00
parent 11404e545e
commit 668bf9a226
6 changed files with 114 additions and 11 deletions

View File

@@ -39,6 +39,7 @@ class MahjongRoomChannel extends Channel {
case 'updateSettings': this.updateSettings(body.key, body.value); break;
case 'addAi': this.addAi(); break;
case 'dahai': this.dahai(body.tile, body.riichi); break;
case 'hora': this.hora(); break;
case 'ron': this.ron(); break;
case 'pon': this.pon(); break;
case 'nop': this.nop(); break;
@@ -74,6 +75,13 @@ class MahjongRoomChannel extends Channel {
this.mahjongService.commit_dahai(this.roomId!, this.user, tile, riichi);
}
@bindThis
private async hora() {
if (this.user == null) return;
this.mahjongService.commit_hora(this.roomId!, this.user);
}
@bindThis
private async ron() {
if (this.user == null) return;