com.anji.tournament
Class GameResults

java.lang.Object
  extended by com.anji.tournament.GameResults

public class GameResults
extends java.lang.Object

Author:
Philip Tucker

Constructor Summary
GameResults()
          default ctor
 
Method Summary
 PlayerStats getPlayer1Stats()
           
 PlayerStats getPlayer2Stats()
           
 void increment(GameResults newResults)
          increment player stats based on new results
 void incrementPlayer1Losses(int count)
           
 void incrementPlayer1Wins(int count)
           
 void incrementRawScore(int player1Points, int player2Points)
           
 void incrementSwapped(GameResults newResults)
          increment player stats based on new results; swap player one and player two stats
 void incrementTies(int count)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GameResults

public GameResults()
default ctor

Method Detail

incrementPlayer1Wins

public void incrementPlayer1Wins(int count)
Parameters:
count - # wins to add to player 1, and losses for player 2

incrementPlayer1Losses

public void incrementPlayer1Losses(int count)
Parameters:
count - # losses to add to player 1, and wins for player 2

incrementTies

public void incrementTies(int count)
Parameters:
count - # ties to add to player 1 and player 2

incrementRawScore

public void incrementRawScore(int player1Points,
                              int player2Points)
Parameters:
player1Points - new points for player 1
player2Points - new points for player 2

increment

public void increment(GameResults newResults)
increment player stats based on new results

Parameters:
newResults -

incrementSwapped

public void incrementSwapped(GameResults newResults)
increment player stats based on new results; swap player one and player two stats

Parameters:
newResults -

getPlayer1Stats

public PlayerStats getPlayer1Stats()
Returns:
player 1 stats

getPlayer2Stats

public PlayerStats getPlayer2Stats()
Returns:
player 2 stats

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()