#include "client/GameClient.h"
#include <iostream>

int main(int argc, char* argv[]) {
    std::string serverAddress = "127.0.0.1";
    int serverPort = 8888;
    
    if (argc > 1) {
        serverAddress = argv[1];
    }
    if (argc > 2) {
        serverPort = std::atoi(argv[2]);
    }
    
    std::cout << "==================================" << std::endl;
    std::cout << "  在线RPG游戏 客户端" << std::endl;
    std::cout << "==================================" << std::endl;
    std::cout << "服务器：" << serverAddress << ":" << serverPort << std::endl;
    std::cout << "==================================" << std::endl;
    
    // 创建并运行客户端
    GameClient client(serverAddress, serverPort);
    client.run();
    
    std::cout << "\n再见！" << std::endl;
    return 0;
}
