| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -229,47 +229,8 @@ class Snowball(pygame.sprite.Sprite): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        self.rect = self.image.get_rect() | 
					 | 
					 | 
					 | 
					        self.rect = self.image.get_rect() | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        self.rect.center=(x, y)  | 
					 | 
					 | 
					 | 
					        self.rect.center=(x, y)  | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					  | 
					 | 
					 | 
					 | 
					  | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					      def move(self, snowball_list, enemy_list): | 
					 | 
					 | 
					 | 
					      def move(self, player): | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					        self.rect.move_ip(4,0) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        target_enemy = None | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        for enemy in enemy_list: | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            if enemy.alive == 1: | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                target_enemy = enemy | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					                break | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if enemy == None: | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        enemy_x = enemy.rect.x | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        enemy_y = enemy.rect.y | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        snowball_x = self.rect.x | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        snowball_y = self.rect.y | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if abs(enemy_x - snowball_x) < 8 and abs(enemy_y - snowball_y) < 8: | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            snowball_list.remove(self) | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            enemy.damage(50) | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        delta_move_x = 0 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        delta_move_y = 0 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if enemy_x < snowball_x: | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            delta_move_x = -4 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        elif enemy_x > snowball_x: | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            delta_move_x = 4 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if enemy_y < snowball_y: | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            delta_move_y = -4 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        elif enemy_y > snowball_y: | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            delta_move_y = 4 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        self.rect.move_ip(delta_move_x, delta_move_y) | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					         | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        #if (self.rect.right > 600): | 
					 | 
					 | 
					 | 
					        #if (self.rect.right > 600): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        #    self.rect.top = 0 | 
					 | 
					 | 
					 | 
					        #    self.rect.top = 0 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        #    self.rect.center = (0, 400) | 
					 | 
					 | 
					 | 
					        #    self.rect.center = (0, 400) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -456,10 +417,14 @@ def start_new_level(count, health): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def valid_space(new_tower): | 
					 | 
					 | 
					 | 
					def valid_space(new_tower): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    global snowman_list | 
					 | 
					 | 
					 | 
					    global snowman_list | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    global cakeman_list | 
					 | 
					 | 
					 | 
					    global cakeman_list | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    global reindeer_list | 
					 | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    combined_tower_list = snowman_list + cakeman_list + reindeer_list | 
					 | 
					 | 
					 | 
					    combined_tower_list = snowman_list + cakeman_list | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    for old_tower in combined_tower_list: | 
					 | 
					 | 
					 | 
					    for old_tower in combined_tower_list: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        print("new: ") | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        print(new_tower.rect) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        print("old: ") | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					        print(old_tower.rect) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if new_tower.rect.colliderect(old_tower.rect): | 
					 | 
					 | 
					 | 
					        if new_tower.rect.colliderect(old_tower.rect): | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            return False | 
					 | 
					 | 
					 | 
					            return False | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					 | 
					@ -654,7 +619,7 @@ while True: | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        kagemand_animation_step = (kagemand_animation_step + 1) % 8 | 
					 | 
					 | 
					 | 
					        kagemand_animation_step = (kagemand_animation_step + 1) % 8 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					     | 
					 | 
					 | 
					 | 
					     | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    for snowball in snowball_list:     | 
					 | 
					 | 
					 | 
					    for snowball in snowball_list:     | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        snowball.move(snowball_list, enemy_list) | 
					 | 
					 | 
					 | 
					        snowball.move(menu_snowman) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        snowball.draw(DISPLAYSURF) | 
					 | 
					 | 
					 | 
					        snowball.draw(DISPLAYSURF) | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					
 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    for laser_beam in laser_beam_list:     | 
					 | 
					 | 
					 | 
					    for laser_beam in laser_beam_list:     | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
  |