Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4171248
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T00:25:28+00:00 2026-05-21T00:25:28+00:00

Ok so I might just be missing something but I am trying to make

  • 0

Ok so I might just be missing something but I am trying to make a hex board map, like in civilizations. The idea is to have each hex as an object that has various properties(ie, color, type, etc). Then have a board of all these various hexes. There would be 3 board types, rectangle, circle, triangle.

The issue I am having is how to represent each hex in a data type. I figured a 2 dimensional array would be the way to go, which would be fine if I just needed to know the hex locations themselves. But I will need to know the vertexes and edges of each hex so that I can do things like on the edge between these to hexes add this. That is what is confusing me. How to represent each hex with all sides and points in an way in which I can ask for neighbors connected to that point or edge etc.

Any ideas, I have read many articles about this, but for some reason I still don’t understand, maybe because it is all ideas and I have no clue hoe to implement it.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T00:25:28+00:00Added an answer on May 21, 2026 at 12:25 am

    A 2-dimensional array would reinforce the concept of a rectangular grid.

    Why not instead define a Cell class, with references to the neighbouring cells thus:

    public class Cell {
       private Cell north;
       private Cell south;
       private Cell northWest;
    
       // etc.
    }
    

    The references would be null for Cells on the boundaries of your grid.

    You’d have to construct the grid by iterating through the rows, creating each Cell and tying it to its neighbours as appropriate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This might be a stupid question but I just wanted to make sure... If
I might be missing something really obvious. I'm trying to write a custom Panel
I might be just thick (nothing new), but I can't seem to find anything
Sometimes it might be useful, but mostly just looking cool or impressive to visualize
This might seem like a stupid question I admit. But I'm in a small
This might be on the discussy side, but I would really like to hear
I just tried (for the first time, I might add) a port upgrade installed
just wondering if anyone could suggest why I might be getting an error? I'm
Before I start with the real question, let me just say that I might
Might be subjective and/or discussion.. but here goes. I've been asked to estimate a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.