This commit is contained in:
syuilo 2024-01-28 20:34:45 +09:00
parent 366fade8d3
commit 1ea098f4b4
3 changed files with 31 additions and 5 deletions

View file

@ -233,3 +233,12 @@ export function getHoraTiles(handTiles: Tile[]): Tile[] {
return horaSets.length > 0;
});
}
export function getTilesForRiichi(handTiles: Tile[]): Tile[] {
return handTiles.filter(tile => {
const tempHandTiles = [...handTiles];
tempHandTiles.splice(tempHandTiles.indexOf(tile), 1);
const horaTiles = getHoraTiles(tempHandTiles);
return horaTiles.length > 0;
});
}