<commit_before>import pygame
import textbox
import packetevent
import listbox
from packet import Packet

def draw(game):
    if game.name == "":
        textbox.draw(game)
    else:
        listbox.draw(game)

def Setname(game,box,isEnterPressed):
    if isEnterPressed:
        game.name = box.text
        game.sockets.send(Packet("setname:{}".format(box.text)).get())

def update(game):
    # listbox.update(game)
    pass

# asks for the text for the current row / column combination
def playerlist_gettext(game, row, column):
    if not game.players[row].name:
        return "<Unnamed player>"

    return game.players[row].name

# this is being called when a serverlist item is being clicked<commit_msg>Lobby playerlist issue fixed<commit_after>import pygame
import textbox
import packetevent
import listbox
from packet import Packet

def draw(game):
    if game.name == "":
        textbox.draw(game)
    else:
        listbox.draw(game)

def Setname(game,box,isEnterPressed):
    if isEnterPressed:
        game.name = box.text
        game.sockets.send(Packet("setname:{}".format(box.text)).get())

def update(game):
    # listbox.update(game)
    pass

# asks for the text for the current row / column combination
def playerlist_gettext(game, row, column):
    plrcount = game.get_player_count()
    # print("Row {} Playercount {}".format(row, plrcount))

    if row == plrcount:
        return "<Unnamed player>"

    if not game.players[row].name:
        return "<Unnamed player>"

    return game.players[row].name

# this is being called when a serverlist item is being clicked
{'fraction_non_alphanumeric': 0.10797237915881984, 'fraction_numerical': 0.0, 'mean_word_length': 3.403314917127072, 'pattern_counts': {'":': 2, '<': 6, '<?xml version=': 0, '>': 6, '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': '3344054', 'n_tokens_mistral': 496, 'n_tokens_neox': 490, 'n_words': 140}