-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChessResult.java
More file actions
97 lines (79 loc) · 1.63 KB
/
Copy pathChessResult.java
File metadata and controls
97 lines (79 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
package edu.unlv.mis768.finalproject;
/**
* This class is used for Chess Results Database
* @author William Brasic and Sergio Torres
*
*/
public class ChessResult {
// initialize fields
private String matchID;
private Player player1;
private Player player2;
// No arg constructor
public ChessResult() {
}
/**
* Constructor
* @param matchID
* @param player1
* @param player2
*/
public ChessResult(String matchID, Player player1, Player player2){
this.matchID = matchID;
this.player1 = player1;
this.player2 = player2;
}
/**
* All String constructor for generating chess result and converting to proper field types.
* @param match
* @param play1
* @param play2
*/
public ChessResult(String match, String play1, String play2) {
matchID = match;
player1.setPlayerName(play1);
player2.setPlayerName(play2);
}
/**
* Getter for matchID
* @return matchID
*/
public String getMatchID() {
return matchID;
}
/**
* Setter for matchID
* @param matchID
*/
public void setMatchID(String matchID) {
this.matchID = matchID;
}
/**
* Getter for player1
* @return player1
*/
public Player getPlayer1() {
return player1;
}
/**
* Setter for player1
* @param player1
*/
public void setPlayer1(Player player1) {
this.player1 = player1;
}
/**
* Getter for player2
* @return player2
*/
public Player getPlayer2() {
return player2;
}
/**
* Setter for player2
* @param player2
*/
public void setPlayer2(Player player2) {
this.player2 = player2;
}
}