Open Starlight-30036225 opened 5 months ago
for fruit in game.fruits:
if fruit.y > 440:
continue
returnMap[int(fruit.y * (NUM_ROWS / HEIGHT))][int(fruit.x * (NUM_COLUMNS / WIDTH))] = -10
for robot in game.enemies:
if robot.y > 440:
continue
returnMap[int(robot.y * (NUM_ROWS / HEIGHT))][int(robot.x * (NUM_COLUMNS / WIDTH))] = 4
Adding this to the map generation assigns values. These will need to be changed later. These values are added to the combined total. This means passing through a fruit is preferable and passing a robot is negative
I want to add an additional cost or penalty to a space.
Like avoiding enemies and benefits for getting additional fruits