<commit_before># coding: UTF-8
from __future__ import absolute_import, division, print_function, unicode_literals

import pygame

from .base import Scene, GameText
from .chess import Chess
from consts.i18n import *


class MainMenu(Scene):

    def __init__(self, *args, **kwargs):
        """MainMenu constructor. Creates texts and buttons"""
        super(MainMenu, self).__init__(*args, **kwargs)

        # Title
        title_font = pygame.font.SysFont("", self.game.relative_x(0.1))
        title = GameText(title_font, TITLE, True, (192, 192, 192))
        title.rect = self.center_rect(
            title.surface, 
            self.game.relative_y(0.1)
        )
        
        menu_font = pygame.font.SysFont("", self.game.relative_x(0.05))
        
        # One Player Button
        one_player = GameText(menu_font, ONE_PLAYER, True, (128, 128, 128))
        one_player.rect = self.center_rect(
            one_player.surface, 
            self.game.relative_y(0.45)
        )

        def one_player_click(game):
            game.scene = Chess(game) #TODO: Change to One Player Scene

        one_player.click = one_player_click

        # Two Players Button
        two_players = GameText(menu_font, TWO_PLAYERS, True, (128, 128, 128))
        two_players.rect = self.center_rect(
            two_players.surface, 
            one_player.rect.bottom + self.game.relative_x(0.04)
        )

        def two_players_click(game):
            game.scene = Scene(game) #TODO: Change to Two Players Scene

        two_players.click = two_players_click

        # Configurations Button
        configurations = GameText(menu_font, CONFIG, True, (128, 128, 128))
        configurations.rect = self.place_rect(
            configurations.surface,
            self.game.relative_x(0.10),
            self.game.relative_y(0.92),
        )

        def configurations_click(game):
            from .config_menu import ConfigMenu
            game.scene = ConfigMenu(game)

        configurations.click = configurations_click

        # Quit Button
        # Quit Button
        quit = GameText(menu_font, QUIT, True, (128, 128, 128))
        quit.rect = self.place_rect(
            quit.surface,
            self.game.relative_x(0.91),
            self.game.relative_y(0.92),
        )

        def quit_click(game):
            game.running = False
<commit_msg>#6 corrigindo botao de dois jogadores<commit_after># coding: UTF-8
from __future__ import absolute_import, division, print_function, unicode_literals

import pygame

from .base import Scene, GameText
from .chess import Chess
from consts.i18n import *


class MainMenu(Scene):

    def __init__(self, *args, **kwargs):
        """MainMenu constructor. Creates texts and buttons"""
        super(MainMenu, self).__init__(*args, **kwargs)

        # Title
        title_font = pygame.font.SysFont("", self.game.relative_x(0.1))
        title = GameText(title_font, TITLE, True, (192, 192, 192))
        title.rect = self.center_rect(
            title.surface, 
            self.game.relative_y(0.1)
        )
        
        menu_font = pygame.font.SysFont("", self.game.relative_x(0.05))
        
        # One Player Button
        one_player = GameText(menu_font, ONE_PLAYER, True, (128, 128, 128))
        one_player.rect = self.center_rect(
            one_player.surface, 
            self.game.relative_y(0.45)
        )

        def one_player_click(game):
            game.scene = Scene(game) #TODO: Change to One Player Scene

        one_player.click = one_player_click

        # Two Players Button
        two_players = GameText(menu_font, TWO_PLAYERS, True, (128, 128, 128))
        two_players.rect = self.center_rect(
            two_players.surface, 
            one_player.rect.bottom + self.game.relative_x(0.04)
        )

        def two_players_click(game):
            game.scene = Chess(game) #TODO: Change to Two Players Scene

        two_players.click = two_players_click

        # Configurations Button
        configurations = GameText(menu_font, CONFIG, True, (128, 128, 128))
        configurations.rect = self.place_rect(
            configurations.surface,
            self.game.relative_x(0.10),
            self.game.relative_y(0.92),
        )

        def configurations_click(game):
            from .config_menu import ConfigMenu
            game.scene = ConfigMenu(game)

        configurations.click = configurations_click

        # Quit Button
        # Quit Button
        quit = GameText(menu_font, QUIT, True, (128, 128, 128))
        quit.rect = self.place_rect(
            quit.surface,
            self.game.relative_x(0.91),
            self.game.relative_y(0.92),
        )

        def quit_click(game):
            game.running = False

{'fraction_non_alphanumeric': 0.10029436501261564, 'fraction_numerical': 0.030908326324642556, 'mean_word_length': 2.1628989361702127, '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': '6779823', 'n_tokens_mistral': 1561, 'n_tokens_neox': 1422, 'n_words': 313}