@Override
	public void update() {
		for(Planet p : planets){
			p.update();
		}
		Set<Ship> toremove = new HashSet<Ship>();
		for(Ship s : ships){
			s.update();
			{
				double x = s.getCentrePoint().getX();
				double y = s.getCentrePoint().getY();
				if(x < 0 || x > width || y < 0 || y > height){
					toremove.add(s);
					continue;
				}
			}
			for(Planet p : planets){
				if(s.intersects(p)){
					p.acceptShip(s);
					toremove.add(s);
					break;
				}
			}
		}
		ships.removeAll(toremove);
	}