wip
This commit is contained in:
parent
366fade8d3
commit
1ea098f4b4
3 changed files with 31 additions and 5 deletions
|
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue