Class GameSession

java.lang.Object
de.presti.ree6.game.core.GameSession

public class GameSession extends Object
Class used to store Information about Games and its related Information.
  • Constructor Summary

    Constructors
    Constructor
    Description
    GameSession(String gameIdentifier, net.dv8tion.jda.api.entities.Guild guild, net.dv8tion.jda.api.entities.Member user, IGame game, net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion messageChannelUnion, ArrayList<net.dv8tion.jda.api.entities.User> participants)
    Constructor for the GameSession.
    GameSession(String gameIdentifier, net.dv8tion.jda.api.entities.Guild guild, net.dv8tion.jda.api.entities.Member user, net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion messageChannelUnion, ArrayList<net.dv8tion.jda.api.entities.User> participants)
    Constructor for the GameSession.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion
    Method used to get the Channel where the Game is played.
    Method used to get the Game class.
    Method used to get the Identifier of the GameSession.
    Method used to get the current Game-State.
    net.dv8tion.jda.api.entities.User
    Retrieve the current Session Host as User
    ArrayList<net.dv8tion.jda.api.entities.User>
    Method used to get the Participants of the Game.
    void
    setGame(IGame game)
    Method used to set the Game class.
    void
    Method used to set the current Game-State.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • GameSession

      public GameSession(String gameIdentifier, net.dv8tion.jda.api.entities.Guild guild, net.dv8tion.jda.api.entities.Member user, net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion messageChannelUnion, ArrayList<net.dv8tion.jda.api.entities.User> participants)
      Constructor for the GameSession.
      Parameters:
      gameIdentifier - The Identifier of the GameSession.
      guild - The Guild in which this Session originated.
      user - The Creator of the Game.
      messageChannelUnion - The Channel where the Game is played.
      participants - The Participants of the Game.
    • GameSession

      public GameSession(String gameIdentifier, net.dv8tion.jda.api.entities.Guild guild, net.dv8tion.jda.api.entities.Member user, IGame game, net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion messageChannelUnion, ArrayList<net.dv8tion.jda.api.entities.User> participants)
      Constructor for the GameSession.
      Parameters:
      gameIdentifier - The Identifier of the GameSession.
      guild - The Guild in which this Session originated.
      user - The Creator of the Game.
      game - The Game class.
      messageChannelUnion - The Channel where the Game is played.
      participants - The Participants of the Game.
  • Method Details

    • getGameIdentifier

      public String getGameIdentifier()
      Method used to get the Identifier of the GameSession.
      Returns:
      The Identifier of the GameSession.
    • getGame

      public IGame getGame()
      Method used to get the Game class.
      Returns:
      The Game class.
    • setGame

      public void setGame(IGame game)
      Method used to set the Game class.
      Parameters:
      game - The Game class.
    • getChannel

      public net.dv8tion.jda.api.entities.channel.unions.MessageChannelUnion getChannel()
      Method used to get the Channel where the Game is played.
      Returns:
      The Channel where the Game is played.
    • getParticipants

      public ArrayList<net.dv8tion.jda.api.entities.User> getParticipants()
      Method used to get the Participants of the Game.
      Returns:
      The Participants of the Game.
    • getGameState

      public GameState getGameState()
      Method used to get the current Game-State.
      Returns:
      The current Game-State.
    • setGameState

      public void setGameState(GameState gameState)
      Method used to set the current Game-State.
      Parameters:
      gameState - The current Game-State.
    • getHostAsUser

      public net.dv8tion.jda.api.entities.User getHostAsUser()
      Retrieve the current Session Host as User
      Returns:
      The current Session Host as User