-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayer.java
More file actions
50 lines (39 loc) · 859 Bytes
/
Copy pathPlayer.java
File metadata and controls
50 lines (39 loc) · 859 Bytes
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
package edu.unlv.mis768.finalproject;
/**
* This is the player class for the chess game
* @author William Brasic and Sergio Torres
*
*/
public class Player {
// initialize fields
public String playerName;
public boolean whitePlayer;
/**
* Getter for player name
* @return playerName
*/
public String getPlayerName() {
return playerName;
}
/**
* Setter for player name
* @param playerName
*/
public void setPlayerName(String playerName) {
this.playerName = playerName;
}
/**
* Constructor
* @param playerName
*/
public Player(String playerName) {
this.playerName = playerName;
}
/**
* Determine if player is white or not
* @return boolean if player is white; false otherwise
*/
public boolean isWhitePlayer() {
return this.whitePlayer;
}
}