Class ReceiveChat

java.lang.Object
java.lang.Thread
it.polimi.ingsw.chat.ReceiveChat
All Implemented Interfaces:
Runnable

public class ReceiveChat extends Thread
class which represent the thread which listen for received chat message (used by the active player)
  • Constructor Details

    • ReceiveChat

      public ReceiveChat(PlayerTUI p)
      normal constructor for this thread
      Parameters:
      p - the active player that will see those messages
  • Method Details

    • run

      public void run()
      the main function of the thread, it reads messages from the inputStream and updates the game chat
      Specified by:
      run in interface Runnable
      Overrides:
      run in class Thread