<?php
require_once dirname(__DIR__).'/services/ReplayService.php';
header('Content-Type: application/json');
$d=$_GET['race_date']??date('Y-m-d');
$r=isset($_GET['race_num'])?(int)$_GET['race_num']:0;
echo json_encode((new ReplayService())->replay($d,$r),JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE);
