<commit_before># -*- coding: utf-8 -*-
import hackarena.constants
from hackarena.constants import Classes
from hackarena.game_objects import BaseGameObject


class Player(BaseGameObject):

    def __init__(
        self,
        username,
        character_class,
        team,
        hp=0,
        last_death=0,
    ):
        self.MAX_HP = Classes.MAX_HP[character_class]

        self.username = username
        self.character_class = character_class
        self.available_spells = Classes.AVAILABLE_SPELLS[character_class]
        self.spell_cast_times = dict((spell, 0) for spell in self.available_spells)
        self.team = team
        self.reset()
        self.last_death = last_death

    def reset(self):
        self.hp = Classes.MAX_HP[self.character_class]
        self.position = {
            'x': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_WIDTH - 2,
            'y': 2 if self.team == 'blue' else hackarena.constants.MAP_TILES_HEIGHT - 2,
        }<commit_msg>Moved character respawns<commit_after># -*- coding: utf-8 -*-
import hackarena.constants
from hackarena.constants import Classes
from hackarena.game_objects import BaseGameObject


class Player(BaseGameObject):

    def __init__(
        self,
        username,
        character_class,
        team,
        hp=0,
        last_death=0,
    ):
        self.MAX_HP = Classes.MAX_HP[character_class]

        self.username = username
        self.character_class = character_class
        self.available_spells = Classes.AVAILABLE_SPELLS[character_class]
        self.spell_cast_times = dict((spell, 0) for spell in self.available_spells)
        self.team = team
        self.reset()
        self.last_death = last_death

    def reset(self):
        self.hp = Classes.MAX_HP[self.character_class]
        self.position = {
            'x': 7 if self.team == 'blue' else hackarena.constants.MAP_TILES_WIDTH - 8,
            'y': 8 if self.team == 'blue' else hackarena.constants.MAP_TILES_HEIGHT - 9,
        }
{'fraction_non_alphanumeric': 0.09466865969108122, 'fraction_numerical': 0.007972097658196313, 'mean_word_length': 2.4561101549053355, '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': '6231229', 'n_tokens_mistral': 640, 'n_tokens_neox': 620, 'n_words': 130}