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

Commit

Permalink
fix bug go to final stepplace
Browse files Browse the repository at this point in the history
  • Loading branch information
mort3za committed Jul 8, 2019
1 parent c256623 commit d05a268
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ludo",
"version": "v1.2.2",
"version": "v1.2.3",
"private": true,
"scripts": {
"start": "yarn serve",
Expand Down
5 changes: 3 additions & 2 deletions src/functions/move-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,8 +181,9 @@ function _getInGameActions(diceInfo: DiceInfo, player: Player): MoveAction[] {
player,
toPosition
);
const toPositionIsFilled = playerMarblesAtToPosition.length > 0;
if (toPositionIsFilled) {
const isToPositionFinal = getStepPlaceOfPosition(toPosition)[StepPlaceProps.STEP_TYPE].includes(StepType.FINAL)
const toPositionIsFilled = playerMarblesAtToPosition.length > 0;
if (!isToPositionFinal && toPositionIsFilled) {
return;
}

Expand Down

0 comments on commit d05a268

Please sign in to comment.