A simulation of crowd dynamics