View Javadoc

1   package cz.cuni.amis.pogamut.ut2004.tournament.match;
2   
3   import cz.cuni.amis.utils.token.IToken;
4   
5   /**
6    * Represents the result of the match (very limited). Just stating whether the match was fought by teams/individuals
7    * and the winner.
8    * 
9    * @author Jimmy
10   */
11  public class UT2004MatchResult {
12  
13  	private boolean individual;
14  	private IToken winnerBot;
15  	private int winnerTeam;
16  	private boolean draw;
17  
18  	public UT2004MatchResult() {		
19  	}
20  	
21  	public UT2004MatchResult(IToken winnerBot) {
22  		this.individual = true;
23  		this.winnerBot = winnerBot;
24  	}
25  	
26  	public UT2004MatchResult(int winnerTeam) {
27  		this.individual = false;
28  		this.winnerTeam = winnerTeam;
29  	}
30  
31  	public boolean isIndividual() {
32  		return individual;
33  	}
34  
35  	public IToken getWinnerBot() {
36  		return winnerBot;
37  	}
38  
39  	public int getWinnerTeam() {
40  		return winnerTeam;
41  	}
42  
43  	public void setIndividual(boolean individual) {
44  		this.individual = individual;
45  	}
46  
47  	public void setWinnerBot(IToken winnerBot) {
48  		this.winnerBot = winnerBot;
49  		this.individual = true;
50  	}
51  
52  	public void setWinnerTeam(int winnerTeam) {
53  		this.winnerTeam = winnerTeam;
54  		this.individual = false;
55  	}
56  	
57  	public boolean isDraw() {
58  		return draw;
59  	}
60  
61  	public void setDraw(boolean draw) {
62  		this.draw = draw;
63  	}
64  	
65  }