Пример #1
0
    def set_destination(self, dest_hex):
        from hexagon import Hexagon

        start_hex = self.get_base_hex()

        # self.curr_path = a_star(start_hex, dest_hex)
        self.curr_path = Hexagon.find_path(start_hex, dest_hex)
Пример #2
0
    def set_destination(self, dest_hex):
        from hexagon import Hexagon

        start_hex = self.get_base_hex()

        # self.curr_path = a_star(start_hex, dest_hex)
        self.curr_path = Hexagon.find_path(start_hex, dest_hex)
Пример #3
0
    def generate(start_seg, stop_seg):#, distance, height_range=(0, 2)):
        from hexagon import Hexagon

        # for curr_seg in a_star(start_seg, stop_seg):
        for curr_seg in Hexagon.find_path(start_seg, stop_seg):
            curr_seg.set_improvement('road', True)
Пример #4
0
    def generate(start_seg, stop_seg):  #, distance, height_range=(0, 2)):
        from hexagon import Hexagon

        # for curr_seg in a_star(start_seg, stop_seg):
        for curr_seg in Hexagon.find_path(start_seg, stop_seg):
            curr_seg.set_improvement('road', True)