voronoi.py 文件源码

python
阅读 28 收藏 0 点赞 0 评论 0

项目:Maps 作者: DarkPurple141 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号