<commit_before>import pygame
import sys
from pygame.locals import *

from variables import *
from Player import *
from Card import *
from create_board import *
from create_game_options import *
from create_player_info import *
from handle_mouse_event import *
from update_game_dice import *
from handle_game import *


# handles all the action to remove player from the game

"""

Rules :

1) return all the cards allocated to that player
2) clear player details from the list

"""

def handle_quit_player(screen,Players,Cards,cur_player):

    player = Players[cur_player]

    # updating the card status and other related fields

    for prop in player.property_owned:

        Cards[prop].status = 0
        Cards[prop].houses_built = 0
        Cards[prop].hotel_built = 0

    for player in player.property_mortgaged:

        Cards[prop].status = 0
        Cards[prop].houses_built = 0
        Cards[prop].hotel_built = 0
   
    # remove player from the list

    Players.remove(player)
    <commit_msg>Updated file<commit_after>import pygame
import sys
from pygame.locals import *

from variables import *
from Player import *
from Card import *
from create_board import *
from create_game_options import *
from create_player_info import *
from handle_mouse_event import *
from update_game_dice import *
from handle_game import *
from handle_decide_winner import *


# handles all the action to remove player from the game

"""

Rules :

1) return all the cards allocated to that player
2) clear player details from the list

"""

def handle_quit_player(screen,Players,Cards,cur_player):

    player = Players[cur_player]

    # updating the card status and other related fields

    for prop in player.property_owned:

        Cards[prop].status = 0
        Cards[prop].houses_built = 0
        Cards[prop].hotel_built = 0

    for player in player.property_mortgaged:

        Cards[prop].status = 0
        Cards[prop].houses_built = 0
        Cards[prop].hotel_built = 0
   
    # remove player from the list

    Players.remove(player)

    if len(Players) == 1:
        handle_decide_winner(screen,Players,Cards,0)
        
    
{'fraction_non_alphanumeric': 0.06679121905651565, 'fraction_numerical': 0.008407286314806165, 'mean_word_length': 3.3983572895277208, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2842896', 'n_tokens_mistral': 664, 'n_tokens_neox': 621, 'n_words': 206}