Class DElim.Match

java.lang.Object
toDesk.src.tournament.formats.DElim.Match
Enclosing class:
DElim

public class DElim.Match extends Object
Purpose: This class represents an individual match.
  • Constructor Details

    • Match

      public Match()
      Returns a new new Match with no players and score 0-0.
    • Match

      public Match(PlayerEntry player1, PlayerEntry player2)
      Returns a new match with players and a score of 0-0.
      Parameters:
      player1 - is the first player.
      player2 - is the second player.
  • Method Details

    • setPlayer1

      public void setPlayer1(PlayerEntry player1)
      Manually sets the first player.
      Parameters:
      player1 - is the first player.
    • setPlayer2

      public void setPlayer2(PlayerEntry player2)
      Manually sets the second player
      Parameters:
      player2 - is the second player
    • incrementPlayer1Score

      public void incrementPlayer1Score()
      This function increments the 1st player's score
    • incrementPlayer2Score

      public void incrementPlayer2Score()
      This function increments the 2nd player's score
    • setPlayer1Score

      public void setPlayer1Score(int score)
      This function manually sets the first player's score.
      Parameters:
      score - is the desired score of the first player.
    • setPlayer2Score

      public void setPlayer2Score(int score)
      This function manually sets the second player's score.
      Parameters:
      score - is the desired score of the second player.
    • getPlayer1

      public PlayerEntry getPlayer1()
      Returns player 1.
      Returns:
      The first player.
    • getPlayer2

      public PlayerEntry getPlayer2()
      Returns player 2.
      Returns:
      The second player.