In the Solitaire game: when clicking an ace that is in the lake, if there are no open spaces in the lake for the ace to move to, an error is thrown due to the following code in handleUpdateLake:
if (cardToMove) {
copyOfLake[destination].push(cardToMove)
if (source === CardSource.River && sourceArray.length) sourceArray[sourceArray.length - 1].flipped = true
}
Update is needed to prevent error.
Expected behavior:
Ace in lake, when clicked, should first move to another open space in the lake (working). If no open space available, Ace should be placed on a compatible card in the River (not working). Otherwise no action should be taken.
In the Solitaire game: when clicking an ace that is in the lake, if there are no open spaces in the lake for the ace to move to, an error is thrown due to the following code in handleUpdateLake:
Update is needed to prevent error.
Expected behavior:
Ace in lake, when clicked, should first move to another open space in the lake (working). If no open space available, Ace should be placed on a compatible card in the River (not working). Otherwise no action should be taken.