remove Date check on Accident

Removed the check on date of accidnet due
	to incomplete information. The start date of
	the simulation will be a static object in the
	future. Implement checks when added. TODO is
	there to reminde.

Signed-off-by: HeshamTB <hishaminv@gmail.com>
This commit is contained in:
HeshamTB 2020-10-27 08:57:13 +03:00
parent 8e20f78eb9
commit d7cbd2910d
Signed by: Hesham
GPG Key ID: 74876157D199B09E

View File

@ -12,12 +12,8 @@ public class Accident {
}
private void setDate(Date date){
Date startOfSimDate = new Date(15000000);
//TODO: make a static final class with needed values
if (date.before(startOfSimDate)){
throw new IllegalArgumentException("Date of Accident before t zero");
}
else this.date = date;
//TODO: maybe change to Calendar type
this.date = date;
}
private void setInvovledCars(Breakable[] cars){