def has_failed(snake, genome):
    """
    This function checks to see if the snake has met any of the fail conditions.
    Since the grid is a standard 30 by 30 grid, the grid object is not required
    to check extremes.

    Arguments:
        snake {Snake} -- The snake whose status is to be found.
        genome -- The genome controlling this snake

    Returns:
        boolean -- true if it has met a fail condition and False otherwise.
    """
    x, y = snake.coords[0][0], snake.coords[0][1]
    if ((x, y) in snake.coords[1:]):
        genome.fitness -= 3  # Loses a lot of points for hitting itself
        return True
    elif x < 0 or x > 29 or y < 0 or y > 29:
        # Loses slightly less pints for hitting the wall because inputs used for
        # the NN generally mean this case is already rare.

        genome.fitness -= 2.5
        return True
    else:
        return False