diff --git a/FBAI.py b/FBAI.py index b467ea8..1d3e7ba 100644 --- a/FBAI.py +++ b/FBAI.py @@ -144,15 +144,6 @@ def draw(self, win): def collide(self, bird, win): - bird_mask = bird.get_mask() - top_mask = pygame.mask.from_surface(self.PIPE_TOP) - bottom_mask = pygame.mask.from_surface(self.PIPE_BOTTOM) - top_offset = (self.x - bird.x, self.top - round(bird.y)) - bottom_offset = (self.x - bird.x, self.bottom - round(bird.y)) - - b_point = bird_mask.overlap(bottom_mask, bottom_offset) - t_point = bird_mask.overlap(top_mask,top_offset) - if b_point or t_point: return True @@ -347,4 +338,4 @@ def run(config_file): # here so that the script will run successfully. local_dir = os.path.dirname(__file__) config_path = os.path.join(local_dir, 'CONFIG.txt') - run(config_path) \ No newline at end of file + run(config_path)