synchronized (lock) {
if (!processingTickEvent) processNextTickEvent();
    public void step(int w, int h) {        //System.out.println("step");        if (!initialized)            return;        synchronized (lock) {            ArrayList remove = new ArrayList();            Transition t;            boolean finished;            for (Iterator ii=transitions.iterator(); ii.hasNext();) {                t = (Transition) ii.next();                finished = t.step();                if (finished)                    remove.add(t);            }            int temp = transitions.size();            for (Iterator rr=remove.iterator(); rr.hasNext();)                transitions.remove(rr.next());            if (temp > 0 && transitions.size() == 0) {                processingTickEvent = false;                tickStatusListeners.notifyListeners(tickCompleted);            }        }    }