def sea_or_land(self,centre,max_dist,island):
x, y = self.centre.get_cords()
point = (x - centre[0])/max_dist,(y - centre[1])/max_dist
land = island.inside(point)
if not land:
self.terrain = -2
self.color = random.choice(color_palettes.ocean)
else:
self.terrain = 2
self.color = (50,150,0)
评论列表
文章目录