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:
parent
8e20f78eb9
commit
d7cbd2910d
@ -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){
|
||||
|
Loading…
Reference in New Issue
Block a user