Class WatchPlayer


  • public class WatchPlayer
    extends Object
    • Constructor Detail

      • WatchPlayer

        public WatchPlayer()
    • Method Detail

      • start

        public void start​(jakarta.websocket.Session session)
      • end

        public void end()
      • incoming

        public void incoming​(String message)
        Expects
                WATCH pid
                IAM pid
                CHAT text
                
      • tellAbout

        public static <T> void tellAbout​(String pid,
                                         T msg)
        Methods handling important events during the game call this method to let watchers now about the most recent event
        Parameters:
        pid - The sender's player ID. The message will be sent to everyone who is watching that player. (In a 2PG, that will be that player's partner, of course)
      • tellHim

        public static void tellHim​(String pid,
                                   WatchPlayer.Ready msg)
        Parameters:
        pid - The destination player ID
      • sendHimChat

        public static void sendHimChat​(String pid,
                                       String s)