-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayer.java
More file actions
27 lines (23 loc) · 759 Bytes
/
Copy pathPlayer.java
File metadata and controls
27 lines (23 loc) · 759 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
/**
* Player
*/
public class Player {
// Attributes of each player
public String position;
public char positionChar;
public int playerID;
public int playerSkill;
// Method used to create players
Player(String position, char positionChar, int playerID, int playerSkill) {
this.position = position;
this.positionChar = positionChar;
this.playerID = playerID;
this.playerSkill = playerSkill;
}
// Prints player statistics, to be called from first menu item
public String playerStats() {
String playerStat = "Name: " + positionChar + playerID +
"\nPosition: " + position + "\nSkill Level: " + playerSkill;
return playerStat;
}
}