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

@@ -12,6 +12,10 @@ export type PlayerState = {
user2House: House;
user3House: House;
user4House: House;
round: 'e' | 's' | 'w' | 'n';
kyoku: number;
tilesCount: number;
/**
@@ -130,6 +134,16 @@ export class PlayerGameEngine {
}
}
public commit_kakan(house: House, tile: Tile) {
console.log('commit_kakan', this.state.turn, house, tile);
if (this.state.turn !== house) throw new PlayerGameEngine.InvalidOperationError();
}
public commit_hora(house: House) {
console.log('commit_hora', this.state.turn, house);
if (this.state.turn !== house) throw new PlayerGameEngine.InvalidOperationError();
}
/**
* ロンします
* @param source 牌を捨てた人