tictactoe module

A module with the main class of the game application.

The application is launched in this module, and the necessary actions are performed after closing the application.

class tictactoe.App

Bases: tkinter.Tk

The main class of the game application.

__init__() None

Make constructor method.

_background_music_mute_unmute() None

Set action for the “Mute/Unmute the background music” button.

_change_language() None

Set action for the language change button.

_change_language_btn_func(frame: tkinter.Frame) None

Render the language change button.

Parameters

frame (class: tkinter.Frame) – Frame for rendering the language change button

_mute_unmute_btn_func(frame: tkinter.Frame) None

Render the “Mute/Unmute the background music” button.

Parameters

frame (class: tkinter.Frame) – Frame for rendering the “Mute/Unmute the background music” button

static resource_path(relative_path: str) str

Get the full path to a file or directory.

Parameters

relative_path (class: str) – Relative path to a file or directory

Returns

The full path to a file or directory

Return type

class: str

switch_frame(frame_class: type) None

Change application page.

Parameters

frame_class (class: type) – The class of any of the game pages

tictactoe.main() None

Run game application and make the necessary actions are performed after closing the application.