Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #28 from MahjongPantheon/TYR-22-daburi-ippatsu-fix
Browse files Browse the repository at this point in the history
TYR-22 allow double riichi + ippatsu
  • Loading branch information
Oleg Klimenko authored May 7, 2017
2 parents 9ce91b3 + 030cc0c commit e4f59d2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/primitives/appstate/yaku.ts
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,14 @@ export function getAllowedYaku(outcome: AppOutcome, mrWinner: number): YakuId[]

function _excludeYaku(outcome: AppOutcome, winner: number, rawYakuList: YakuId[], list: YakuId[], toBeExcluded: YakuId[]) {
return list.filter((yaku: YakuId) => {
if ( // disable ippatsu if riichi is not selected
if ( // disable ippatsu if riichi or double riichi is not selected
yaku === YakuId.IPPATSU
&& (
outcome.selectedOutcome === 'ron'
|| outcome.selectedOutcome === 'tsumo'
|| outcome.selectedOutcome === 'multiron'
)
&& rawYakuList.indexOf(YakuId.RIICHI) === -1
&& (rawYakuList.indexOf(YakuId.RIICHI) === -1 && rawYakuList.indexOf(YakuId.DOUBLERIICHI) === -1)
) {
return false;
}
Expand Down

0 comments on commit e4f59d2

Please sign in to comment.