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

$controller = new GameController();

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

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