Class RunGameInSameJVM

    • Field Detail

      • LOGGER

        private static final java.util.logging.Logger LOGGER
      • presetOptions

        private final Options presetOptions
        To exchange data between us and the GetPlayersWeb dialog when game is started locally
      • webClient

        private final WebClient webClient
      • initiatingWebClient

        private static WebClient initiatingWebClient
      • username

        private final java.lang.String username
    • Method Detail

      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Overrides:
        run in class java.lang.Thread
      • runGameInSameJVM

        public void runGameInSameJVM()
      • runGetPlayersDialogAndWait

        void runGetPlayersDialogAndWait​(Options presetOptions,
                                        WhatNextManager whatNextManager)
      • tellServerToInformOtherPlayers

        public void tellServerToInformOtherPlayers()
      • sleepFor

        public static void sleepFor​(long millis)
      • getWebClient

        private WebClient getWebClient()
      • getInitiatingWebClient

        public static WebClient getInitiatingWebClient()
        if a Game Server game was started locally on players computer, then GameServerSide queries the starting web client from here.
        Returns:
        The last WebClient that initiated a game start.
      • getHostingPlayerName

        public java.lang.String getHostingPlayerName()
      • setServerNull

        public void setServerNull()
      • waitUntilReadyToAcceptClients

        public boolean waitUntilReadyToAcceptClients​(int timeout)
        Description copied from interface: IGameRunner
        Waits until socket is up, i.e. game is ready to accept clients.
        Specified by:
        waitUntilReadyToAcceptClients in interface IGameRunner
      • gotClient

        public void gotClient​(java.lang.String playerName,
                              boolean remote)
        Specified by:
        gotClient in interface INotifyWebServer