Fix error in Camp.addVehicle()

Signed-off-by: HeshamTB <hishaminv@gmail.com>
This commit is contained in:
HeshamTB 2020-11-09 12:30:18 +03:00
parent 11252e7996
commit af5548734d

View File

@ -56,11 +56,10 @@ public class Street {
return true;
}
public void addVehicle( Vehicle vehicle ) {
if(capcity()>0) {
for(int i=0;i<getVehicles().size();i++) {
addVehicle.set(i, getVehicles().get(i));
}
public void addVehicle(Vehicle vehicle) {
if(capcity() > 0) {
//adds incoming vehicle in last.
vehicles.add(vehicle);
}
//TODO Ammar i hope that
}