def _draw_agent(center_point, screen, base_size=30):
'''
Args:
center_point (tuple): (x,y)
screen (pygame.Surface)
Returns:
(pygame.rect)
'''
tri_bot_left = center_point[0] - base_size, center_point[1] + base_size
tri_bot_right = center_point[0] + base_size, center_point[1] + base_size
tri_top = center_point[0], center_point[1] - base_size
tri = [tri_bot_left, tri_top, tri_bot_right]
tri_color = (98, 140, 190)
return pygame.draw.polygon(screen, tri_color, tri)
评论列表
文章目录