API Docs for:
Show:

hex_core.HexLocation Class

This represents a location of a hex in a hex coordinate system. It has some utility functions

Constructor

hex_core.HexLocation

(
  • x
  • y
)

Parameters:

  • x Integer
  • y Integer

Item Index

Methods

equals

(
  • otherLocation
)

This is used to check if two locations are equal

Parameters:

Returns:

boolean Returns true if the other location has the same x,y

getNeighborLocation

(
  • hexDirection
)

This gets the surrounding hex locations

Parameters:

  • hexDirection HexDirection

Returns:

hex_core.HexLocation Returns a location next to this one, in the direction of the 'hexDirection' given