Does anyone can help me with java?

May 1, 2020 at 3:49pm
I have to make a java program to find the shortest path between to points to avoid the landmine field. The path must not pass inside of the landmine field but to a go around it. Also, I have to give the coordinates of the landmines and the two points. To be honest I have no idea where to start, so I would like to help me to figure it out. Thanks in advance.
Last edited on May 1, 2020 at 6:17pm
May 1, 2020 at 4:58pm
*looks at title of site*

Finding the shortest path while avoiding obstacles is known as a "pathfinding" or "path search" problem.
Check out this website: http://qiao.github.io/PathFinding.js/visual/
I'd say either use A*, Breadth-First Search, or Dijkstra. Of course, that site is in Javascript... but you could use it as a starting point to translate it into C++, Java, or whatever.

Or (probably easier): Search the internet for tutorials on those algorithms. You probably don't need it to be the most efficient algorithm ever, it just needs to get the job done.
Last edited on May 1, 2020 at 5:05pm
May 1, 2020 at 6:23pm
Yeah, I saw it that's why I have that name on my topic. Anyway, thanks for helping me I appreciate it.
Topic archived. No new replies allowed.