a random walk
> a random walk with pen on paper
// 0: up, 1: right, 2: down, 3: left
const direction = Math.floor(4 * Math.random());
console.log(direction);
> a random walk with pen on paper
// 0: up, 1: right, 2: down, 3: left
const direction = Math.floor(4 * Math.random());
console.log(direction);