@echo off
REM STARWASTE - Multiplayer Test Launch Script

echo.
echo ============================================
echo   STARWASTE - Multiplayer Mode (2 Players)
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 (Numba noise generation)
echo Waiting for server initialization...
timeout /t 4 /nobreak >nul

REM Start Player 1
echo Starting Player 1...
start "STARWASTE - Player 1" "%~dp0STARWASTE\starwaste_client.exe" --connect 127.0.0.1:5555 --username Player1

REM Short delay between clients
timeout /t 1 /nobreak >nul

REM Start Player 2
echo Starting Player 2...
start "STARWASTE - Player 2" "%~dp0STARWASTE\starwaste_client.exe" --connect 127.0.0.1:5555 --username Player2

echo.
echo Both players started!
echo Close both client windows to stop.
echo.
pause
