use current free cargo value on add order to track
This commit is contained in:
@@ -7,7 +7,7 @@ import java.util.regex.Pattern;
|
||||
public class Ship {
|
||||
private final static int REFILL_FUEL_STEP = 10;
|
||||
|
||||
private int cargo;
|
||||
private long cargo;
|
||||
private Engine engine;
|
||||
private double tank;
|
||||
private double mass;
|
||||
@@ -32,11 +32,11 @@ public class Ship {
|
||||
return ship != null ? new Ship(ship) : ship;
|
||||
}
|
||||
|
||||
public int getCargo() {
|
||||
public long getCargo() {
|
||||
return cargo;
|
||||
}
|
||||
|
||||
public void setCargo(int cargo) {
|
||||
public void setCargo(long cargo) {
|
||||
this.cargo = cargo;
|
||||
clearCache();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user