Package org.swtpra1

Class Leaderboard.LeaderboardEntry

  • Enclosing class:
    Leaderboard

    public static class Leaderboard.LeaderboardEntry
    extends java.lang.Object
    Represents a single player and his score in the currently running tournament.
    • Constructor Summary

      Constructors 
      Constructor Description
      LeaderboardEntry​(Player player)
      New leaderboard entries for a player have 0 games played and 0 wins/losses.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void countGame()
      Increments the gamesPlayed counter by one.
      void countLoss()
      Increments the loss counter for this entry by one, as well as the gamesPlayed.
      void countWin()
      Increments the win counter for this entry by one, as well as the gamesPlayed.
      java.lang.Integer getGamesLost()  
      java.lang.Integer getGamesPlayed()  
      java.lang.Integer getGamesRunning()  
      java.lang.Integer getGamesWon()  
      Player getPlayer()  
      • Methods inherited from class java.lang.Object

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

      • LeaderboardEntry

        public LeaderboardEntry​(Player player)
        New leaderboard entries for a player have 0 games played and 0 wins/losses.
        Parameters:
        player - the player for which this entry is
    • Method Detail

      • countWin

        public void countWin()
        Increments the win counter for this entry by one, as well as the gamesPlayed.
      • countLoss

        public void countLoss()
        Increments the loss counter for this entry by one, as well as the gamesPlayed.
      • countGame

        public void countGame()
        Increments the gamesPlayed counter by one.
      • getPlayer

        public Player getPlayer()
      • getGamesPlayed

        public java.lang.Integer getGamesPlayed()
      • getGamesWon

        public java.lang.Integer getGamesWon()
      • getGamesLost

        public java.lang.Integer getGamesLost()
      • getGamesRunning

        public java.lang.Integer getGamesRunning()