Skip to content

Commit

Permalink
Fixed coast bar generation strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
prevostc committed Jan 10, 2015
1 parent 6b96cdb commit 2612d54
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion www/js/catan/js/generator/generator.harbor.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@
Catan.Tools.shuffle(coastBarsOrderedClockwiseType2);

var coastLandTypesOrderedClockwise = [];
var randomCoastBarType = Math.round(Math.random() * 100);
for (var i = 0 ; i < 6 ; i++) {
var harborBars = i % 2 ? coastBarsOrderedClockwiseType1 : coastBarsOrderedClockwiseType2;
var harborBars = (i + randomCoastBarType) % 2 ? coastBarsOrderedClockwiseType1 : coastBarsOrderedClockwiseType2;
var harborBar = harborBars.pop();
coastLandTypesOrderedClockwise.push(harborBar.pop());
coastLandTypesOrderedClockwise.push(harborBar.pop());
Expand Down

0 comments on commit 2612d54

Please sign in to comment.