Permalink
Browse files

Fixed calculation bug

  • Loading branch information...
benjisimon committed Dec 18, 2018
1 parent 6081394 commit ed5bdfcb4ee0c1fbd4976f4d7b7e699429932bf8
Showing with 3 additions and 2 deletions.
  1. +3 −2 best.vacay.ever/index.php
@@ -54,7 +54,7 @@ function recommend($grade) {
$recs['top_activity'] = $activity;
$recs['top_score'] = $value;
}
if($value > $recs['top_activity']) {
if($value > $recs['top_score']) {
$recs['top_activity'] = $activity;
$recs['top_score'] = $value;
}
@@ -63,7 +63,7 @@ function recommend($grade) {
$recs['bottom_activity'] = $activity;
$recs['bottom_score'] = $value;
}
if($value < $recs['top_activity']) {
if($value < $recs['top_score']) {
$recs['bottom_activity'] = $activity;
$recs['bottom_score'] = $value;
}
@@ -100,6 +100,7 @@ function slurp($grade) {
$scores[$worst] -= 100;
}
}
return $scores;
}

0 comments on commit ed5bdfc

Please sign in to comment.