Find Enemy Find Enemy
Simple
English


Find distance and direction to enemy in a HEX-grid

HEX-grid

HEX-Grid

Absolute Directions

Directions

Relative Directions

* if your absolute directions is "N"

Relative Directions

Input: three arguments, your corrent coordinates, your current absolute direction, enemy's coordinates.

Output: list, relative direction to the enemy and distance to the enemy .

Example:

find_enemy('B2', 'S', 'B4') == ['F', 2]

Example


How it is used:

War-game design using hex-grid

Precondition:
'A1' ≤ coordinates ≤ 'Z9'.
direction in ('N', 'NE', 'SE', 'S', 'SW', 'NW').
your coordinates ≠ enemy's coordinates.