How can I get this little maze game to work?

I'm currently making a maze game for my project due tonight 23:59, and I seriously need help to get this maze working. This is the code that I have for now, and I hope I can maybe get a little help on figuring out how the sprite would not be able to walk through walls. Thank you if you are giving me suggestions.


Welcome Sevintin.

The maze described in the discussion below will not allow the sprite to walk through black colored walls by checking the color of the background. You could write similar code. :smiley:

Could I get some actual directions on how to make it work? It's a bit confusing to me.

Here is a partial solution using a Ball. Write similar code for your Sprite.


This code shows a possible up button.

If you drive your Ball ( sprite ) up against a boundary that is above your marker moving in the y direction, the code will 'bounce' the marker off the boundary (return it to white space on the Canvas).

Make the Code needed for the right, left and down will be similar. The MoveTo would be different depending on the direction you move.

Experiment to determine the right, left and down coding.