I am DMing a game of DnD and one of my players is really into fear effects, which is cool, but the effect of having monsters suffer from the "panicked" condition gets tedious to render via dice rolls.
The rule is, on the battle grid the monster will run for 1 square in a random direction, then from that new position it will move into another random adjacent square. repeat this process until its moved its full move speed.
movespeed = 6;
points = Point[
NestList[{(#[[1]] + RandomChoice[{-1, 0, 1}]), #[[2]] +
RandomChoice[{-1, 0, 1}]} &, {11/2, 11/2}, movespeed]];
Graphics[{PointSize[Large], points},
GridLines -> {Range[0, 11], Range[0, 11]},
PlotRange -> {{0, 11}, {0, 11}}, Axes -> True]
I have written some code that shows me the squares the monster moves through, but I would love to replace the little black dots with numbers like "1", "2",...,"6" so that I know the path it actually took.