Python Forum
How to find adjacent units in a line in the hexagon of the array
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to find adjacent units in a line in the hexagon of the array
#1
In this array of hexagons, how to implement three consecutive hexagons into a linear hexagon.
The current idea is that we randomly find a point A, then take point A as the center of symmetry and find the other two points on both sides of the point. The method implemented first finds the closest point of point A by the shortest distance and then filters through three points of the total line.
Another idea is to abstract the graph into 0,1 (hollow for 0, solid for 1), then call the random number function and set three consecutive ones.
Reply
#2
In what hexagons? It is unclear how the hexagons are implemented, making it impossible to answer the question. Beyond that, what have you tried? We're not big on writing code for people here, but we would be happy to help you fix your code when you run into problems. When you do run into problems, please post your code in Python tags, and clearly explain the problem you are having, including the full text of any errors.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#3
In the array hexagon, a certain number of consecutive three hexagons are connected, but they are not adjacent.
See the first map of the following website page.
[Image: 3]

Hello, friend. I want to upload pictures and explain my problems more clearly, but I haven't found a way to upload pictures. My email address is [email protected]. Can you contact me?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Changing units with tens kazek17 1 946 Oct-06-2022, 10:12 AM
Last Post: rob101

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020