T
T
Tera Incognita2021-06-10 16:50:16
Informatics
Tera Incognita, 2021-06-10 16:50:16

A simplified version of walking in hexes, how to improve?

Informatics for schools , the process of working in mblock and scratch

I solved the problem of walking on getks and refused to calculate the breadth first search and the dijkstra algorithm
But there is one problem .
60c217c652514501093829.gif
As you can see, you can build a path without a complex algorithm
60c217ffc3fdb661670877.jpeg
. The problem is, if the path is within a straight line, everything is fine. If it is not quite straight, then we have two squares.

How to solve this problem?

we have a sprite that does two things, numbers the cells and paves the way, the problem is that it still captures two cells at once, does anyone have any ideas how to avoid this?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question