-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathEarthDeposit.java
More file actions
53 lines (42 loc) · 777 Bytes
/
EarthDeposit.java
File metadata and controls
53 lines (42 loc) · 777 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
import bc.*;
public class EarthDeposit{
private MapLocation loc;
private long count;
public EarthDeposit(MapLocation boop, PlanetMap earthMap){
loc = boop;
count = earthMap.initialKarboniteAt(boop);
}
public EarthDeposit(MapLocation boop, long num){
loc = boop;
count = num;
}
public MapLocation getLoc(){
return loc;
}
public long getCount(){
return count;
}
public void changeCount(long c){
count = c;
}
public long workerCollect(){
if(count > 2){
count -= 3;
}
else{
count = 0;
}
return getCount();
}
public long getValue(MapLocation playerLocation){
long val = playerLocation.distanceSquaredTo(loc);
return val;
}
/*
* getLoc
* getCount
* changeCount
* gardenerGet
* changeOwnership
*/
}