Module app

Interface GameSocket<M extends Move<P>,P extends Piece>

All Known Implementing Classes:
InteractiveGame

public interface GameSocket<M extends Move<P>,P extends Piece>
Interface of socket that players and spectators can connect to in order to play/spectate the game
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    connectPlayer(int playerId, Player<M,P> player)
    Connects the player and handles the controls
    void
    Connects spectator that listens to the events
  • Method Details

    • connectPlayer

      void connectPlayer(int playerId, Player<M,P> player)
      Connects the player and handles the controls
      Parameters:
      playerId - id of connected player (in game)
      player - player to be connected
    • connectSpectator

      void connectSpectator(Spectator<M,P> spectator)
      Connects spectator that listens to the events
      Parameters:
      spectator - spectator to be connected