-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNormalPropertyCard.java
More file actions
71 lines (66 loc) · 1.57 KB
/
Copy pathNormalPropertyCard.java
File metadata and controls
71 lines (66 loc) · 1.57 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
/*
Nick Soetaert
October 10, 2018
NormalPropertyCard.java
Parent: PropertyCard
Children: N/A
*/
public class NormalPropertyCard extends PropertyCard {
//Pre: A card color is given. All cards of same color are same.
//Post: A card is constructed with proper value
public NormalPropertyCard(PropertyColor color){
_canPutInBank = false; //No NormalPropertyCard can be banked
switch (color){
case BROWN:
_name = "Brown Property Card";
_value = 1;
currColor = PropertyColor.BROWN;
break;
case LIGHT_BLUE:
_name = "Light Blue Property Card";
_value = 1;
currColor = PropertyColor.LIGHT_BLUE;
break;
case PINK:
_name = "Pink Property Card";
_value = 2;
currColor = PropertyColor.PINK;
break;
case ORANGE:
_name = "Orange Property Card";
_value = 2;
currColor = PropertyColor.ORANGE;
break;
case RED:
_name = "Red Property Card";
_value = 3;
currColor = PropertyColor.RED;
break;
case YELLOW:
_name = "Yellow Property Card";
_value = 3;
currColor = PropertyColor.YELLOW;
break;
case GREEN:
_name = "Green Property Card";
_value = 4;
currColor = PropertyColor.GREEN;
break;
case BLUE:
_name = "Blue Property Card";
_value = 4;
currColor = PropertyColor.BLUE;
break;
case RAIL:
_name = "Railroad Property Card";
_value = 1;
currColor = PropertyColor.RAIL;
break;
case UTIL:
_name = "Utility Property Card";
_value = 2;
currColor = PropertyColor.UTIL;
break;
}
}
}