public Simulator(SimState state, ArrayList<Event> events, SimView view)
	{
		//Store variables
		this.state = state;
		this.view = view;
		this.queue = new EventQueue();
		this.state.setQueue(this.queue);
		
		//Loop trough and add supplied events
		for(Event ev : events)
		{
			ev.setState(this.state);
			this.queue.add(ev);
		}

		//Iterate trough all events (some events may create new events) until there are non left or a StopEvent is reaced
		for(Event event : this.queue)//This will automatically get an iterator and then call next() as long as hasNext() returns true
		{
			event.execute();
			
			if(event instanceof StopEvent)
			{
				break;//Break if instance of StopEvent (could be extended to application specific stop event)
			}
		}
	}