How do i go about this idea for a game??

I want to create a program which dynamically creates a grid similar to the one shown in the diagram. The number of rows should be chosen using a random number generator. The number of columns should also be chosen using a random number generator.The arrow should be initially positioned in the bottom left position on the grid. The arrow should be programmed to move in accordance with the instructions that will be placed into a textbox at the bottom of the screen at runtime. Once the button