<?php

require_once __DIR__ . "/Library/AutoLoad.php";

use Framework\Common\ConfigManager;
use Framework\Log\LogMark;
use Game\Config\GameConfig;
use Game\Constant\DBTableDefine;
use Game\Constant\PacketDefineI;
use Game\Constant\ModelTypeDefine;
use Game\GameLive;

$type = "";
if (isset($_GET['type'])) {
    $type = $_GET['type'];
}
$zone="";
if (isset($_GET['zone'])) {
    $zone = $_GET['zone'];
}

if($zone == "" ){
    echo "game zone 不存在";
    return;
}
if($type == ""){
    echo "工具不存在";
    return;
}


GameLive::getInstance()->InitZone($zone);
GameLive::getInstance()->InitLog(GameConfig::getInstance()->LOG_PATH());
GameLive::getInstance()->InitException();
GameLive::getInstance()->InitDefineConfig();

$file = __DIR__ . "/Tool/".$type."/Index.php";
if(!file_exists($file))
{
    echo "工具".$type."不存在";
    return;
}
require_once $file;

GameLive::getInstance()->GameOver();
