package net.woodyfolsom.msproj;


public class GoPlayer {
	private String country;
	private String name;
	private String rank;

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRank() {
		return rank;
	}

	public void setRank(String rank) {
		this.rank = rank;
	}

	public String toSGF(Player color) {
		if (color == Player.BLACK) {
			return "PB[" + name + "]BR[" + rank + "]BC[" + country + "]";
		} else if (color == Player.WHITE) {
			return "PW[" + name + "]WR[" + rank + "]WC[" + country + "]";
		} else {
			throw new RuntimeException("Invalid player color: " + color);
		}
	}
}
