'Compiles' and 'works'.

This commit is contained in:
Robert Kolner committed 2012-03-27 10:59:04 +02:00
1 parent 56c5e54668
commit df3d67a454
1 file changed
+4 -4
+4 -4
View File
@@ -67,17 +67,17 @@ function chooseDropLocation(brickId) {
var dropLocations = getAllPossibleDropLocations(brickId);
var bestRank = 0;
var bestId = -1;
var bestId = 0;
for (var i = 0; i < dropLocations.length; i++) {
var rank = 0;
if (dropLocations[i][1] < dropLocations[best][1]) {
best = i;
if (dropLocations[i][1] < dropLocations[bestId][1]) {
bestId = i;
}
}
return dropLocations[best];
return dropLocations[bestId];
}
function chooseAction(dropLocation) {