Create an n by m array (n, m input by user). Initialize all cells in array to 0. The bug starts at cell 1,1. The bug can jump from its cell to any neighboring cell (left, right, up, down, diagonal) -- so there are at most 8 neighboring cells. Though, for example, cell 1, 1, has only 3 neighboring cells, If the bug tries to jump of of the array, ignore that move. A move is determined by generating a random number between 1 and 8.
1 -- jump left
2 -- jump right
3 -- jump up
4 -- jump down
5 -- jump up and right
6 -- jump up and left
7 -- jump down and right
8 -- jump down and left
Count how many moves it takes until the bug has visited each cell at least once. Display the array after each move, with a count for each cell of how many times the bug has visited that cell as well as what is the bug's current location.