(position, direction)
Returns the next position coordinates
Returns the next position coordinates
Returns the next position coordinates
def get_next_position(position, direction):
    '''Returns the next position coordinates'''
    x, y = position
    if direction == constants.Action.Right:
        return (x, y + 1)
    elif direction == constants.Action.Left:
        return (x, y - 1)
    elif direction == constants.Action.Down:
        return (x + 1, y)
    elif direction == constants.Action.Up:
        return (x - 1, y)
    elif direction == constants.Action.Stop:
        return (x, y)
    raise constants.InvalidAction("We did not receive a valid direction.")
def get_next_position ( position , direction ) : x , y = position if direction == constants . Action . Right : return ( x , y + 1 ) elif direction == constants . Action . Left : return ( x , y - 1 ) elif direction == constants . Action . Down : return ( x + 1 , y ) elif direction == constants . Action . Up : return ( x - 1 , y ) elif direction == constants . Action . Stop : return ( x , y ) raise constants . InvalidAction ( "We did not receive a valid direction." )