Class Hexagonal
java.lang.Object
application.model.rules.misc.turmites.Neighbourhood
application.model.rules.misc.turmites.Hexagonal
public class Hexagonal extends Neighbourhood
Implements turmites on the hexagonal neighbourhood
- 
Constructor SummaryConstructors Constructor Description Hexagonal()
- 
Method SummaryModifier and Type Method Description int[]getActions()Gets the actions the turmite can takeCoordinate[]getNeighbourhood()Gets the neighbourhood of the turmiteintgetNewDirection(int action, int turmiteDirection)Gets the new direction of the turmiteintgetOppositeDirection(int direction)Gets direction opposite to the direction passed inTilinggetTiling()Gets the tiling the neighbourhood applies to
- 
Constructor Details- 
Hexagonalpublic Hexagonal()
 
- 
- 
Method Details- 
getTilingDescription copied from class:NeighbourhoodGets the tiling the neighbourhood applies to- Specified by:
- getTilingin class- Neighbourhood
- Returns:
- Returns the tiling of the neighbourhood
 
- 
getActionspublic int[] getActions()Description copied from class:NeighbourhoodGets the actions the turmite can take- Specified by:
- getActionsin class- Neighbourhood
- Returns:
- Returns the actions that the turmite can take
 
- 
getNeighbourhoodDescription copied from class:NeighbourhoodGets the neighbourhood of the turmite- Specified by:
- getNeighbourhoodin class- Neighbourhood
- Returns:
- Returns the neighbourhood of the turmite
 
- 
getOppositeDirectionpublic int getOppositeDirection(int direction)Description copied from class:NeighbourhoodGets direction opposite to the direction passed in- Specified by:
- getOppositeDirectionin class- Neighbourhood
- Parameters:
- direction- The direction
- Returns:
- Returns the opposite direction of the direction passed in
 
- 
getNewDirectionpublic int getNewDirection(int action, int turmiteDirection)Description copied from class:NeighbourhoodGets the new direction of the turmite- Specified by:
- getNewDirectionin class- Neighbourhood
- Parameters:
- action- The action taken by the turmite
- turmiteDirection- The turmite's direction
- Returns:
- Returns the new direction of the turmite
 
 
-