def get_coordinates( x,y,direction ):
    """
    Given (x,y) coordinates and direction, this function returns the 
    coordinates of the next tile
    
    The strange coordinate system used to represent hexagonal grids here
    is called the 'Axial Coordinate System'. 
    
    Reference: https://www.redblobgames.com/grids/hexagons/
    """
    coordinate_transform = { 
                            'e' : ( x+1, y   ), 
                            'se': ( x  , y+1 ), 
                            'sw': ( x-1, y+1 ), 
                            'w' : ( x-1, y   ), 
                            'nw': ( x  , y-1 ), 
                            'ne': ( x+1, y-1 ), 
                            }
    return coordinate_transform[ direction ]