This commit is contained in:
p57492168 2022-07-02 11:09:59 +08:00
parent 3776f9c2b8
commit e465b5123f
1 changed files with 1 additions and 2 deletions

View File

@ -29,7 +29,7 @@ class SeaEnvEngine(object):
ship_radius: int,
ship_velocity: int,
sonar_spread_times: int,
sonar_spread_times: int,
obstacles: dict,
@ -129,7 +129,6 @@ class SeaEnvEngine(object):
cur_obstacle = self.create_rectangle_obstacle(x, y, width, height)
self.obstacles.append(cur_obstacle)
self.obstacles_w_h.append((width, height))
# label the position of obstacles as -1
for i in range(x//self.field_size[0], (x+width)//self.field_size[0]):
for j in range(y//self.field_size[1], (y+height)//self.field_size[1]):
self.fields[i, self.fields.shape[1]-j-1] = -1