-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayer.java
More file actions
executable file
·63 lines (58 loc) · 920 Bytes
/
Player.java
File metadata and controls
executable file
·63 lines (58 loc) · 920 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
51
52
53
54
55
56
57
58
59
60
61
62
63
import java.awt.Color;
public class Player
{
private String name;
private String college;
private Color color;
private int money;
public Player(String n, String startc, String c)
{
name = n;
college = startc;
money = 0;
if(c == "Green")
{
color = new Color(0,255,0,100);
}
else if(c == "Blue")
{
color = new Color(0,0,255,100);
}
else if(c == "Red")
{
color = new Color(255,0,0,100);
}
else if(c == "Yellow")
{
color = new Color(255,255,0,100);
}
else
{
color = new Color(128, 128, 128, 100);
}
}
public void setColor(Color c)
{
color = c;
}
public Color getColor()
{
return color;
}
public String getCollege()
{
return college;
}
public int getMoney()
{
return money;
}
public void changeMoney(int m)
{
money += m;
}
public String getName()
{
return name;
}
}