<?php

    include_once('functions.php');
	$RACE['time'] = 6;
	$RACE['track_length_km'] = 5.2;
	$RACE['num_sectors'] = 3;

	$numServers = 1;
	$server_crash = false;
	
	$useManualIdServer1 = false;
	$manualIdServer1 = 28;
	$useManualIdServer2 = false;
	$manualIdServer2 = 7;
	$useManualIdServer3 = false;
	$manualIdServer3 = 3;
	
	$showPresuffix = true;
	
    include_once('spyc.php');

    $array = Spyc::YAMLLoad('teams.yaml');
	$RACE['time'] = $array['raceTime'];
	$RACE['track_length_km'] = $array['raceTrackLengthKm'];
	$RACE['num_sectors'] = $array['raceNumSectors'];
	unset($array['raceTime']);
	unset($array['raceTrackLengthKm']);
	unset($array['raceNumSectors']);
	$driver = array();
	$TEAMS = array();
	foreach ($array as $arr) {
	    $record = array();
	    $record['team_name'] = $arr['teamName'];
	    $record['name_presuffix'] = $arr['nameSuffix'];
	    $record['car'] = $arr['car'];
	    $record['number'] = addzeros($arr['number']);
	    $record['penalty_laps'] = $arr['penalty_laps'];
	    $record['standings_correction'] = $arr['standings_correction'];
	    $record['display'] = true;
	    foreach ($arr['driver'] as $dri) {
		$record['driver_lfs'][] = $dri[0];
		$record['driver_real'][] = $dri[1];
		$record['driver_country'][] = $dri[2];
		$record['driver_active'][] = true;
	    }
	    $TEAMS[] = $record;
	}
	
	define ("COMPARE_LAPS", 6);

	$err = array
				(
					"nimmt" => "Joined session",
					"antwortet" => "Timeout",
					"verlässt" => "Leaves pit",
					"geht" => "SHIFT + S"
				);


?>