@echo off
REM STARWASTE - Singleplayer Launch Script

echo.
echo ============================================
echo   STARWASTE - Singleplayer Mode
echo ============================================
echo.

REM Start server in background
echo Starting server...
start /B "STARWASTE Server" "%~dp0STARWASTE_Server\starwaste_server.exe" --host 127.0.0.1 --port 5555

REM Wait for server to start
timeout /t 3 /nobreak >nul

REM Start client
echo Starting client...
"%~dp0STARWASTE\starwaste_client.exe" --connect 127.0.0.1:5555 --username Player1

REM Kill server when client exits
taskkill /FI "WINDOWTITLE eq STARWASTE Server*" /F >nul 2>&1

echo.
echo Game closed. Have a nice day!
pause
