drunken man simulation in javascript