From af5548734d22e76c251b38ee27282079adf2207c Mon Sep 17 00:00:00 2001 From: HeshamTB Date: Mon, 9 Nov 2020 12:30:18 +0300 Subject: [PATCH] Fix error in Camp.addVehicle() Signed-off-by: HeshamTB --- src/Street.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/Street.java b/src/Street.java index b76bcc2..b8d3ffd 100644 --- a/src/Street.java +++ b/src/Street.java @@ -56,11 +56,10 @@ public class Street { return true; } - public void addVehicle( Vehicle vehicle ) { - if(capcity()>0) { - for(int i=0;i 0) { + //adds incoming vehicle in last. + vehicles.add(vehicle); } //TODO Ammar i hope that }