def __transform_center(gap_width, x, y):
    """
    Depending on the region which the coin lands,
    this function transforms the coin onto a
    Cartesian plane where the axes are the closest
    corner and returns the coordinates of the
    center of the circle.
    """

    split = gap_width/2

    if x > split:
        x -= gap_width
    if y > split:
        y -= gap_width

    return (x, y)