def populate_attractive_field(height, width, goal_xy):
“”"
Creates an attractive field
returns: 1D flat grid map
“”"
field = [0] * height * width
for row in range(height):
for col in range(width):
force_value = random_force()
# Assign to potential field
field[row + width * col] = force_value
return field
Normally, how to define row, column in a map?
I mean, How to know which side is row, and which side is column?