Class PlayerVsPlayerChallenge

java.lang.Object
games.stendhal.server.core.rp.pvp.PlayerVsPlayerChallenge

public class PlayerVsPlayerChallenge extends Object
  • Constructor Details

    • PlayerVsPlayerChallenge

      public PlayerVsPlayerChallenge(long opened, Player challenger, Player challenged)
  • Method Details

    • equals

      public boolean equals(Object obj)
      Two Challenges are equal iff opened, challenger and challenged are equals.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isAccepted

      public boolean isAccepted()
      Returns:
      true iff the challenged player has accepted the challenge
    • accept

      public void accept(long acceptanceTurn, Player challenged)
    • isInvolved

      public boolean isInvolved(Player player)
      Checks if a player is involved into this challenge
      Parameters:
      the - player to check
      Returns:
      true if player equals challenged or challenger
    • getOpened

      public long getOpened()
      Returns:
      the turn number in which this challenge was opened
    • getChallenger

      public Player getChallenger()
      Returns:
      the player who started this challenge
    • getChallenged

      public Player getChallenged()
      Returns:
      the player who was challenged