<?php
require '../controllers/TournamentController.php';

$controller = new TournamentController();

$action = $_GET['action'] ?? 'index';
$id = $_GET['id'] ?? null;

switch ($action) {
    case 'index':
    default:
        if ($id) {
            $controller->show($id);
        } else {
            header("Location: ./index.php");
            exit;
        }
        break;
}
