Get out of a maze. Code proposal

Hello friends,

this is a code proposal, an idea, a challenge,... it's about drawing a maze and the path to get out of it.

Let's go.

1.- Using dots, draw a red line around the cross.

  • We use a Canvas and two ImageSprites.
  • The crossing of the ImageSprites is random, you don't know where they cross.

cruz1

maze_cross.aia (4.2 KB) (Unfinished code.).

2 Likes

2.- Segment crossing.

  • Surround the image with a red line, created with dots.

segmentos_rodear.aia (15.0 KB) (Unfinished code).

1 Like

3.- How to get out of a maze?

The best-known rule for traversing mazes is the wall follower, also known as either the left-hand rule or the right-hand rule. If the maze is simply connected, that is, all its walls are connected together or to the maze's outer boundary, then by keeping one hand in contact with one wall of the maze the solver is guaranteed not to get lost and will reach a different exit if there is one; otherwise, the algorithm will return to the entrance having traversed every corridor next to that connected section of walls at least once. (Wikipedia - Maze-solving_algorithm).

  • Use the following image and draw a line attached to the wall using red dots.

maze5

1 Like

4.- Interesting.

4 Likes

Here you can make your own mazes

https://www.mazegenerator.net/Examples.aspx

@Juan_Antonio troppo forteeee..certo che in ogni micromouse, ci deve essere una grandissima quantità di codiceeee :astonished: