Skip to content

Commit

Permalink
Merge pull request #3 from ditam/missing-victory-check
Browse files Browse the repository at this point in the history
add victory check after rot stage
  • Loading branch information
ditam authored Oct 9, 2019
2 parents ffe2004 + 3728f8f commit a9705e9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,8 @@ $(function() {
player.css('left', getAreaPosition(town).left);
// rot inventory according to distance travelled
rot(inventory, products, Math.abs(towns[prevTown].distance - towns[currentTown].distance));
// NB rotting might trigger a victory by filling the fruit type quota
checkVictory(inventory, money);
renderInventory(products, inventory, money);
increaseStockpiles(towns, products, prices);
renderPricesTable(towns, products, prices);
Expand Down

0 comments on commit a9705e9

Please sign in to comment.