package tournament;

import gen.Player;

public class Standing 
{
	public Player player;
	public int wins;
	public int losses;
	public int draws;
	public Standing(Player player, int w, int l, int d){
		this.player = player;
		wins = w;
		losses = l;
		draws = d;
	}
	/** The sum of this Standing and Standing b. */
	public Standing sum(Standing b){
		if(!b.player.equals(this.player)){
			System.err.println("Sum of Standings with different Players uses calling Player.");
		}
		return new Standing(this.player, this.wins + b.wins, this.losses + b.losses, this.draws + b.draws);
	}
	
	public String print() { return player.print() + " Wins: " + wins + " Losses: " + losses + " Draws: " + draws; }
	public Standing setPlayer(Player player) { return new Standing(player, wins, losses, draws); }
}