private void waitForPlayers() {
        System.out.println("Waiting for players to connect...");
        System.out.println(neededPlayers + " players needed to start game!");
        
        while(run) {
            lock.lock();
            if(connectedPlayers == neededPlayers) {
                break;
            }
            lock.unlock();
        }
    }