claim.py 文件源码

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

项目:halite_bot 作者: ewirkerman 项目源码 文件源码
def filter_out_loc(self, loc):
        old_best = self.get_best_claim()

        copy = list(self.heap)
        for claim in self.heap:
            # this is a problem for roots?
            if loc is claim.get_parent().loc:
                copy.remove(claim)
                claim.set_heap(None)

        if loc.gameMap().getLocation(self.site().loc, self.dir) == loc:
            self.dir = None
        self.heap = copy
        heapq.heapify(self.heap)
        self.check_heap(old_best)
        # logger.debug("Removed all children from %s that would come to %s" % (self.site().loc, loc ) )
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号