Fix error in Camp.addVehicle()
Signed-off-by: HeshamTB <hishaminv@gmail.com>
This commit is contained in:
parent
11252e7996
commit
af5548734d
@ -56,11 +56,10 @@ public class Street {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addVehicle( Vehicle vehicle ) {
|
public void addVehicle(Vehicle vehicle) {
|
||||||
if(capcity()>0) {
|
if(capcity() > 0) {
|
||||||
for(int i=0;i<getVehicles().size();i++) {
|
//adds incoming vehicle in last.
|
||||||
addVehicle.set(i, getVehicles().get(i));
|
vehicles.add(vehicle);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//TODO Ammar i hope that
|
//TODO Ammar i hope that
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user