forked from science-ation/science-ation
Don't use round2 scoring in the cost funciton if there is no round2
This commit is contained in:
parent
147655171c
commit
d4782758aa
@ -42,6 +42,10 @@ function TRACE_R($array) { print_r($array); }
|
||||
|
||||
TRACE("<pre>");
|
||||
|
||||
$round_divisional1 = NULL;
|
||||
$round_divisional2 = NULL;
|
||||
|
||||
|
||||
|
||||
function set_status($txt)
|
||||
{
|
||||
@ -89,7 +93,8 @@ function judges_cost_function($annealer, $bucket_id, $ids)
|
||||
{
|
||||
global $config;
|
||||
global $jteam;
|
||||
global $judges;
|
||||
global $judges, $round_divisional2;
|
||||
|
||||
/* Bucket ID is the team number */
|
||||
/* ids are the judge ids currently in the bucket */
|
||||
|
||||
@ -166,8 +171,10 @@ function judges_cost_function($annealer, $bucket_id, $ids)
|
||||
$cost += 40;
|
||||
|
||||
/* Huge penalty for not having a round2 person on the team */
|
||||
if($have_div2 == false)
|
||||
$cost += 40;
|
||||
if($round_divisional2 != NULL) {
|
||||
if($have_div2 == false)
|
||||
$cost += 40;
|
||||
}
|
||||
|
||||
// TRACE("Team $bucket_id, cost is $cost\n");
|
||||
|
||||
@ -334,8 +341,6 @@ while($r=mysql_fetch_object($q)) {
|
||||
}
|
||||
|
||||
TRACE("Loading Judging Round time data...\n");
|
||||
$round_divisional1 = NULL;
|
||||
$round_divisional2 = NULL;
|
||||
$round_special_awards = array();
|
||||
$round = array();
|
||||
$q = mysql_query("SELECT * FROM judges_timeslots WHERE round_id='0' AND `year`='{$config['FAIRYEAR']}'");
|
||||
|
Loading…
x
Reference in New Issue
Block a user