Simulation of surface discharge dynamics by means of cellular automata