Package toDesk.src.tournament.formats
Class DElim.Match
java.lang.Object
toDesk.src.tournament.formats.DElim.Match
- Enclosing class:
- DElim
Purpose: This class represents an individual match.
-
Constructor Summary
ConstructorsConstructorDescriptionMatch()Returns a new new Match with no players and score 0-0.Match(PlayerEntry player1, PlayerEntry player2) Returns a new match with players and a score of 0-0. -
Method Summary
Modifier and TypeMethodDescriptionReturns player 1.Returns player 2.voidThis function increments the 1st player's scorevoidThis function increments the 2nd player's scorevoidsetPlayer1(PlayerEntry player1) Manually sets the first player.voidsetPlayer1Score(int score) This function manually sets the first player's score.voidsetPlayer2(PlayerEntry player2) Manually sets the second playervoidsetPlayer2Score(int score) This function manually sets the second player's score.
-
Constructor Details
-
Match
public Match()Returns a new new Match with no players and score 0-0. -
Match
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
Manually sets the first player.- Parameters:
player1- is the first player.
-
setPlayer2
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
Returns player 1.- Returns:
- The first player.
-
getPlayer2
Returns player 2.- Returns:
- The second player.
-