Simulation of pedestrian dynamics using a two-dimensional cellular automaton