diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml new file mode 100644 index 0000000..19f4f4d --- /dev/null +++ b/.github/workflows/flake8.yml @@ -0,0 +1,33 @@ +name: Flake8 Linting + +on: + push: + branches: + - main + - work + pull_request: + branches: + - main + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.8' + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint flake8 + pip install -r requirements.txt + + - name: Run Flake8 + run: | + flake8 tetr_cli --max-line-length=100 diff --git a/pyproject.toml b/pyproject.toml index 19eb43a..236dd90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "tetr_cli" -version = "1.0.2" +version = "1.0.3" description = "Setup script for the tetr_cli package." authors = [ { name = "Airun_Iru", email = "hugo_s_tanaka@yahoo.com" } diff --git a/setup.py b/setup.py index 99614fb..f686caa 100644 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name="tetr_cli", - version="1.0.2", + version="1.0.3", packages=find_packages(), entry_points={ "console_scripts": [ diff --git a/tetr_cli/main.py b/tetr_cli/main.py index 7997591..4a6d89e 100644 --- a/tetr_cli/main.py +++ b/tetr_cli/main.py @@ -75,13 +75,14 @@ "Score_Screen": "score_screen", # Solo Modes "Solo_Menu": "solo.solo_menu", + "Level_Select": "solo.level_select", "Marathon": "solo.marathon", "Sprint": "solo.sprint", "Ultra": "solo.ultra", # Multiplayer Modes - "Multi_Menu": "multi.multi_menu", - "Host_Room": "multi.host_room", - "Join_Room": "multi.join_room", + # "Multi_Menu": "multi.multi_menu", + # "Host_Room": "multi.host_room", + # "Join_Room": "multi.join_room", } @@ -132,15 +133,17 @@ async def main( init_pair(6, 46, -1) # S init_pair(7, 196, -1) # Z init_pair(8, 244, -1) # Garbage + init_pair(9, 15, -1) # White else: - init_pair(1, COLOR_YELLOW, -1) # O - init_pair(2, COLOR_CYAN, -1) # I - init_pair(3, COLOR_MAGENTA, -1) # T + init_pair(1, COLOR_YELLOW, COLOR_BLACK) # O + init_pair(2, COLOR_CYAN, COLOR_BLACK) # I + init_pair(3, COLOR_MAGENTA, COLOR_BLACK) # T init_pair(4, COLOR_YELLOW, COLOR_BLACK) # L - init_pair(5, COLOR_BLUE, -1) # J - init_pair(6, COLOR_GREEN, -1) # S - init_pair(7, COLOR_RED, -1) # Z + init_pair(5, COLOR_BLUE, COLOR_BLACK) # J + init_pair(6, COLOR_GREEN, COLOR_BLACK) # S + init_pair(7, COLOR_RED, COLOR_BLACK) # Z init_pair(8, COLOR_WHITE, COLOR_BLACK) # Light gray on black + init_pair(9, COLOR_WHITE, COLOR_BLACK) # White start_time: float = 0.0 elapsed_time: float = 0.0 diff --git a/tetr_cli/tetr_modules/menu_core/menu_mode.py b/tetr_cli/tetr_modules/menu_core/menu_mode.py index 6b68e0c..cd22d4f 100644 --- a/tetr_cli/tetr_modules/menu_core/menu_mode.py +++ b/tetr_cli/tetr_modules/menu_core/menu_mode.py @@ -108,6 +108,11 @@ def current_value(self) -> int: """This will return the current value.""" return self.__current_value + @current_value.setter + def current_value(self, value: int) -> None: + """This will set the current value.""" + self.__current_value = value + @property def old_value(self) -> int: """This will return the old value.""" diff --git a/tetr_cli/tetr_modules/modes/multi/join_wait_room.py b/tetr_cli/tetr_modules/modes/multi/join_wait_room.py index 0299246..381278b 100644 --- a/tetr_cli/tetr_modules/modes/multi/join_wait_room.py +++ b/tetr_cli/tetr_modules/modes/multi/join_wait_room.py @@ -1,9 +1,10 @@ """This will display the wait room menu.""" + # coding: utf-8 -from typing import Dict +# from typing import Dict -from curses import window +# from curses import window from tetr_cli.tetr_modules.menu_core.base_mode import BaseModeClass @@ -16,4 +17,4 @@ def __init__(self) -> None: if __name__ == "__main__": - print("This is a module file and cannot be run directly.") \ No newline at end of file + print("This is a module file and cannot be run directly.") diff --git a/tetr_cli/tetr_modules/modes/solo/level_select_mode.py b/tetr_cli/tetr_modules/modes/solo/level_select_mode.py new file mode 100644 index 0000000..af83272 --- /dev/null +++ b/tetr_cli/tetr_modules/modes/solo/level_select_mode.py @@ -0,0 +1,42 @@ +"""This will handle the level select screen.""" + +from typing import Dict, Set +from curses import window + +from tetr_cli.tetr_modules.menu_core.menu_mode import SideMenuToggleClass +from tetr_cli.tetr_modules.modules.database import set_temp + +TOGGLE_TO_ACTION: Dict[str, Dict[str, str]] = { + "Confirm": {"action": "Marathon", "sound": "select_confirm"}, + "Go_Back": {"action": "Solo_Menu", "sound": "select_back"}, +} + + +class ModeClass(SideMenuToggleClass): + """This will handle the option mode menu.""" + + def __init__(self) -> None: + """This will initialize this class.""" + super().__init__( + toggle_name="level", + toggle_to_action=TOGGLE_TO_ACTION, + lower=0, + upper=25, + step=5, + ) + self.current_value = 1 + + def increment_frame(self, stdscr: window, pressed_keys: Set[str]) -> None: + """This will progress the menu based on the inputs.""" + self.menu_control(pressed_keys) + self.display_toggle(stdscr, "Marathon Level") + if self.current_value == 0: + self.current_value = 1 + elif self.current_value == 6: + self.current_value = 5 + if "enter" in pressed_keys: + set_temp("level", str(self.current_value)) + + +if __name__ == "__main__": + print("This is a bgm_option module, please run starter.py.") diff --git a/tetr_cli/tetr_modules/modes/solo/marathon_mode.py b/tetr_cli/tetr_modules/modes/solo/marathon_mode.py index ef54efc..34cfb3c 100644 --- a/tetr_cli/tetr_modules/modes/solo/marathon_mode.py +++ b/tetr_cli/tetr_modules/modes/solo/marathon_mode.py @@ -13,7 +13,7 @@ DRAW_BOARD_HEIGHT, DRAW_BOARD_WIDTH, ) -from tetr_cli.tetr_modules.modules.database import set_temp, get_setting +from tetr_cli.tetr_modules.modules.database import set_temp, get_temp, get_setting from tetr_cli.tetr_modules.modules.safe_curses import safe_addstr @@ -30,6 +30,7 @@ def __init__(self) -> None: self.mode: str = "countdown" self.__das: int = int((int(get_setting("das", "10")) * self.fps_limit) / 60) self.__arr: int = int((int(get_setting("arr", "2")) * self.fps_limit) / 60) + self.level: int = int(get_temp("level")) def show_stats(self, stdscr: window) -> None: """This will show the stats on bottom right.""" @@ -160,6 +161,18 @@ def play_mode(self, stdscr: window, pressed_keys: Set[str]) -> None: self.sound_action["BGM"] = ["stop"] return + if self.board.animation_mode: + self.board.animate_clear_lines(self.level) + self.board.draw_minos_on_board( + stdscr=stdscr, + offset=self.offset, + max_yx=self.max_yx, + current_mino=self.current_mino, + ghost_position=self.ghost_mino_position(self.current_mino), + ) + self.display_action_text(stdscr) + return + # Level up for every 10 lines cleared self.level = max(self.level, (self.lines_cleared // 10) + 1) @@ -198,6 +211,7 @@ def play_mode(self, stdscr: window, pressed_keys: Set[str]) -> None: self.current_mino.orientation, self.current_mino.position, ) + self.sound_action["SFX"].append("place_mino") self.calculate_score() self.reset_mino() @@ -241,7 +255,7 @@ def countdown_mode(self, stdscr: window) -> None: self.mode = "play_music_wait" self.sound_action["SFX"].append("go") safe_addstr(stdscr, self.max_yx[0] // 2, self.max_yx[1] // 2, "Go", A_BOLD) - self.counter = self.fps_limit // 2 + self.counter = (3 * self.fps_limit) // 2 def increment_frame(self, stdscr: window, pressed_keys: Set[str]) -> None: """This will increment the frame.""" diff --git a/tetr_cli/tetr_modules/modes/solo/solo_menu_mode.py b/tetr_cli/tetr_modules/modes/solo/solo_menu_mode.py index 71f8996..cc8535f 100644 --- a/tetr_cli/tetr_modules/modes/solo/solo_menu_mode.py +++ b/tetr_cli/tetr_modules/modes/solo/solo_menu_mode.py @@ -10,7 +10,7 @@ OPTION_TO_ACTION: Dict[str, Dict[str, str]] = { - "Marathon": {"action": "Marathon", "sound": "select_confirm"}, + "Marathon": {"action": "Level_Select", "sound": "select_confirm"}, "Sprint": {"action": "Sprint", "sound": "select_confirm"}, "Ultra": {"action": "Ultra", "sound": "select_confirm"}, "Go_Back": {"action": "Main_Menu", "sound": "select_back"}, diff --git a/tetr_cli/tetr_modules/modes/solo/sprint_mode.py b/tetr_cli/tetr_modules/modes/solo/sprint_mode.py index 9a0a79e..dea9381 100644 --- a/tetr_cli/tetr_modules/modes/solo/sprint_mode.py +++ b/tetr_cli/tetr_modules/modes/solo/sprint_mode.py @@ -193,6 +193,18 @@ def play_mode(self, stdscr: window, pressed_keys: Set[str]) -> None: arr=self.__arr, ) + if self.board.animation_mode: + self.board.animate_clear_lines(self.level) + self.board.draw_minos_on_board( + stdscr=stdscr, + offset=self.offset, + max_yx=self.max_yx, + current_mino=self.current_mino, + ghost_position=self.ghost_mino_position(self.current_mino), + ) + self.display_action_text(stdscr) + return + self.check_keyinput_pressed(pressed_keys=pressed_keys) if not self.current_mino: self.board.draw_minos_on_board( @@ -228,6 +240,7 @@ def play_mode(self, stdscr: window, pressed_keys: Set[str]) -> None: self.current_mino.orientation, self.current_mino.position, ) + self.sound_action["SFX"].append("place_mino") self.calculate_score() self.reset_mino() diff --git a/tetr_cli/tetr_modules/modes/solo/ultra_mode.py b/tetr_cli/tetr_modules/modes/solo/ultra_mode.py index c8418e8..cad87e1 100644 --- a/tetr_cli/tetr_modules/modes/solo/ultra_mode.py +++ b/tetr_cli/tetr_modules/modes/solo/ultra_mode.py @@ -201,6 +201,18 @@ def play_mode(self, stdscr: window, pressed_keys: Set[str]) -> None: arr=self.__arr, ) + if self.board.animation_mode: + self.board.animate_clear_lines(self.level) + self.board.draw_minos_on_board( + stdscr=stdscr, + offset=self.offset, + max_yx=self.max_yx, + current_mino=self.current_mino, + ghost_position=self.ghost_mino_position(self.current_mino), + ) + self.display_action_text(stdscr) + return + self.check_keyinput_pressed(pressed_keys=pressed_keys) if not self.current_mino: self.board.draw_minos_on_board( @@ -236,6 +248,7 @@ def play_mode(self, stdscr: window, pressed_keys: Set[str]) -> None: self.current_mino.orientation, self.current_mino.position, ) + self.sound_action["SFX"].append("place_mino") self.calculate_score() self.reset_mino() diff --git a/tetr_cli/tetr_modules/modules/sound.py b/tetr_cli/tetr_modules/modules/sound.py index e432e0c..a81d477 100644 --- a/tetr_cli/tetr_modules/modules/sound.py +++ b/tetr_cli/tetr_modules/modules/sound.py @@ -17,6 +17,7 @@ async def load_sfx() -> Dict[str, Sound]: """Load all sound effects.""" mixer.init() + mixer.set_num_channels(32) mixer.music.set_volume(float(get_setting("music_volume", "25")) / 100) sound_effects = { @@ -25,10 +26,14 @@ async def load_sfx() -> Dict[str, Sound]: "select_back": mixer.Sound(str(sound_path / "sfx/select_back.wav")), "single": mixer.Sound(str(sound_path / "sfx/single.wav")), "double": mixer.Sound(str(sound_path / "sfx/double.wav")), + "triple": mixer.Sound(str(sound_path / "sfx/triple.wav")), "quad": mixer.Sound(str(sound_path / "sfx/quad.wav")), - "t_spin_single": mixer.Sound(str(sound_path / "sfx/t_spin_single.wav")), - "t_spin_double": mixer.Sound(str(sound_path / "sfx/t_spin_double.wav")), - "t_spin_triple": mixer.Sound(str(sound_path / "sfx/t_spin_triple.wav")), + "t_spin": mixer.Sound(str(sound_path / "sfx/t_spin.wav")), + "all_clear": mixer.Sound(str(sound_path / "sfx/all_clear.wav")), + "hold": mixer.Sound(str(sound_path / "sfx/hold.wav")), + "place_mino": mixer.Sound(str(sound_path / "sfx/place_mino.wav")), + "rotate": mixer.Sound(str(sound_path / "sfx/rotate.wav")), + "move": mixer.Sound(str(sound_path / "sfx/move.wav")), "countdown": mixer.Sound(str(sound_path / "sfx/countdown.wav")), "go": mixer.Sound(str(sound_path / "sfx/go.wav")), } @@ -63,6 +68,7 @@ async def play_sounds( if sound_action and "SFX" in sound_action: for sfx in sound_action["SFX"]: try: + sound_effect_dict[sfx].stop() sound_effect_dict[sfx].play() except Exception as err: print(f"Failed to play SFX: {err}") diff --git a/tetr_cli/tetr_modules/solo_core/base.py b/tetr_cli/tetr_modules/solo_core/base.py index a74a571..b6b173a 100644 --- a/tetr_cli/tetr_modules/solo_core/base.py +++ b/tetr_cli/tetr_modules/solo_core/base.py @@ -35,7 +35,7 @@ def __init__(self, given_level: int = 1) -> None: self.score: int = 0 # Board - self.board: Board = Board() + self.board: Board = Board(self.fps_limit) # Mino self.current_mino: Optional[Mino] = None @@ -227,7 +227,6 @@ def calculate_score(self, rows_dropped: int = 0) -> None: else: self.combo_count = 0 - self.board.clear_lines() action_text: List[str] = [] current_score, back_to_back, action_text = calculate_line_score( lines_cleared=lines_clear_detected, @@ -243,20 +242,18 @@ def calculate_score(self, rows_dropped: int = 0) -> None: if action_text: self.action["action_text"] = action_text + if all_clear_detected: + self.sound_action["SFX"].append("all_clear") if t_spin_detected: - if lines_clear_detected <= 1: - self.sound_action["SFX"].append("t_spin_single") - elif lines_clear_detected == 2: - self.sound_action["SFX"].append("t_spin_double") - elif lines_clear_detected == 3: - self.sound_action["SFX"].append("t_spin_triple") - else: - if lines_clear_detected == 1: - self.sound_action["SFX"].append("single") - elif lines_clear_detected in (2, 3): - self.sound_action["SFX"].append("double") - elif lines_clear_detected == 4: - self.sound_action["SFX"].append("quad") + self.sound_action["SFX"].append("t_spin") + if lines_clear_detected == 1: + self.sound_action["SFX"].append("single") + elif lines_clear_detected == 2: + self.sound_action["SFX"].append("double") + elif lines_clear_detected == 3: + self.sound_action["SFX"].append("triple") + elif lines_clear_detected == 4: + self.sound_action["SFX"].append("quad") def check_keyinput_pressed(self, pressed_keys: Set[str]) -> None: """This will check the keyinput pressed.""" @@ -271,21 +268,27 @@ def check_keyinput_pressed(self, pressed_keys: Set[str]) -> None: if not self.current_mino: return + rotated: bool = False if ( pressed_keys & self.get_user_keybind("rotate_ccw") and "ccw" not in self.keyinput_cooldown ): - self.current_mino.rotate("left", self.is_position_valid) + rotated = self.current_mino.rotate("left", self.is_position_valid) self.keyinput_cooldown.add("ccw") + if ( pressed_keys & self.get_user_keybind("rotate_cw") and "cw" not in self.keyinput_cooldown ): - self.current_mino.rotate("right", self.is_position_valid) + rotated = self.current_mino.rotate("right", self.is_position_valid) self.keyinput_cooldown.add("cw") - self.current_mino.handle_sideways_auto_repeat( + moved_sideways: bool = self.current_mino.handle_sideways_auto_repeat( pressed_keys, self.mino_touching_side, self.get_user_keybind ) + if moved_sideways: + self.sound_action["SFX"].append("move") + if rotated: + self.sound_action["SFX"].append("rotate") if pressed_keys & self.get_user_keybind("soft_drop"): if not self.mino_touching_bottom(self.current_mino): self.current_mino.soft_drop( @@ -296,6 +299,7 @@ def check_keyinput_pressed(self, pressed_keys: Set[str]) -> None: soft_drop_distance=1, hard_drop_distance=0, ) + self.sound_action["SFX"].append("move") if ( pressed_keys & self.get_user_keybind("hard_drop") and "hard_drop" not in self.keyinput_cooldown @@ -314,6 +318,7 @@ def check_keyinput_pressed(self, pressed_keys: Set[str]) -> None: self.reset_mino() self.keyinput_cooldown.add("hard_drop") + self.sound_action["SFX"].append("place_mino") if ( pressed_keys & self.get_user_keybind("hold_piece") and not pressed_keys & self.get_user_keybind("hard_drop") @@ -331,6 +336,7 @@ def check_keyinput_pressed(self, pressed_keys: Set[str]) -> None: "lock_count": 15, "lock_height": 21, } + self.sound_action["SFX"].append("hold") self.reset_mino(current_mino_check=True, hold_used_check=True) else: self.current_hold = copy(self.current_mino) diff --git a/tetr_cli/tetr_modules/solo_core/board.py b/tetr_cli/tetr_modules/solo_core/board.py index d91cb2b..0b9fd78 100644 --- a/tetr_cli/tetr_modules/solo_core/board.py +++ b/tetr_cli/tetr_modules/solo_core/board.py @@ -28,9 +28,18 @@ class Board: """This will handle the game board.""" - def __init__(self) -> None: + def __init__(self, fps_limit: int) -> None: """This will initialize this class.""" + self.__fps_limit = fps_limit + self.__clear_time = 6 * fps_limit // 15 + # 60FPS 24 + # 45FPS 18 + # 30FPS 12 + # 15FPS 6 + self.__line_clear_queue: List[int] = [] + self.__animation_mode: bool = False + self.__clear_counter: int = 0 self.__board: List[List[int]] = [ ([0] * BOARD_WIDTH) for _ in range(BOARD_HEIGHT) ] @@ -40,7 +49,14 @@ def __init__(self) -> None: ) self.__mino_style: str = get_setting("mino_style", "[]") self.__ghost_mino_style: str = MINO_TO_GHOST.get(self.__mino_style, "??") - self.__mino_color_setting: bool = get_setting("color_mode", "true").lower() == "true" + self.__mino_color_setting: bool = ( + get_setting("color_mode", "true").lower() == "true" + ) + + @property + def animation_mode(self) -> bool: + """This will return if the board is in animation mode.""" + return self.__animation_mode def clear(self) -> None: """This will clear the board.""" @@ -129,11 +145,30 @@ def check_line_clear(self) -> int: if all(cell != 0 for cell in self.__board[row]): self.__line_clear_queue.append(row) line_cleared += 1 + if line_cleared > 0: + self.__animation_mode = True return line_cleared - def clear_lines(self) -> None: - """This will clear the lines and return the number of lines cleared.""" + def animate_clear_lines(self, level: int) -> None: + """This will animate the line clear.""" # Reverse sort to do it in ascending order + if level >= 30: + self.__clear_time -= 1 * self.__fps_limit // 15 + if self.__clear_time < 3: + self.__clear_time = 3 + if self.__clear_counter < self.__clear_time: + # every 10% of the clear time, toggle the blocks + col: int = (self.__clear_counter * 10 // self.__clear_time) + left_limit: int = max(0, col - 2) + for row in self.__line_clear_queue: + self.__board[row][left_limit:col] = [0] * (col - left_limit) + if col < BOARD_WIDTH: + self.__board[row][col] = 9 + self.__clear_counter += 1 + return + + self.__animation_mode = False + self.__clear_counter = 0 for row in sorted(self.__line_clear_queue, reverse=True): del self.__board[row] self.__board.append([0] * BOARD_WIDTH) @@ -218,7 +253,7 @@ def draw_minos_on_board( mino_shape = MINO_DRAW_LOCATION[current_mino.type][current_mino.orientation] # Draw ghost Mino - if self.__ghost_piece_setting: + if self.__ghost_piece_setting and not self.__animation_mode: draw_board = self.add_ghost_mino( current_mino, draw_board, ghost_position ) @@ -260,13 +295,7 @@ def draw_minos_on_board( color = abs(cell) mino_color: int = color_pair(color) if cell else A_BOLD if 0 <= y < max_yx[0] and 0 <= x < max_yx[1] - 1: - safe_addstr( - stdscr, - y, - x, - char, - mino_color - ) + safe_addstr(stdscr, y, x, char, mino_color) def draw_queue( self, @@ -437,22 +466,14 @@ def draw_hold( color: int = 0 if self.__mino_color_setting: color = MINO_COLOR.get(mino_type, 0) - mino_color: int = color_pair( - color if not hold_used else 8 - ) + mino_color: int = color_pair(color if not hold_used else 8) for y_offset, x_offset in mino_shape: pos = ( mino_offset[0] + (mino_height - 1 - y_offset), mino_offset[1] + x_offset * 2, ) if 0 <= pos[0] < max_yx[0] and 0 <= pos[1] < max_yx[1] - 1: - safe_addstr( - stdscr, - pos[0], - pos[1], - mino_char, - mino_color - ) + safe_addstr(stdscr, pos[0], pos[1], mino_char, mino_color) if __name__ == "__main__": diff --git a/tetr_cli/tetr_modules/solo_core/mino.py b/tetr_cli/tetr_modules/solo_core/mino.py index e3850b7..4177ffb 100644 --- a/tetr_cli/tetr_modules/solo_core/mino.py +++ b/tetr_cli/tetr_modules/solo_core/mino.py @@ -117,10 +117,10 @@ def rotate( self, direction: str, is_position_valid: Callable[[List[Tuple[int, int]]], bool], - ) -> None: + ) -> bool: """This will rotate the current mino.""" if direction not in ["left", "right"]: - return + return False current_index: int = MINO_ORIENTATIONS.index(self.orientation) new_index: int = 0 @@ -155,8 +155,9 @@ def rotate( self.__kick_number = kick_num self.__orientation = temp_orientation self.__position = temp_position - return + return True self.__kick_number = 0 # No kick applied if rotation fails + return False def move_sideways(self, direction: str) -> None: """This will move the current mino sideways.""" @@ -172,7 +173,7 @@ def handle_sideways_auto_repeat( pressed_keys: Set[str], mino_touching_side_func: Callable[[str, "Mino"], bool], get_user_keybind: Callable[[str], Set[str]], - ) -> None: + ) -> bool: """Handles auto-repeat for left/right movement.""" direction: str = "" if get_user_keybind("move_left") & pressed_keys and not ( @@ -186,12 +187,12 @@ def handle_sideways_auto_repeat( if mino_touching_side_func(direction, self): self.__auto_repeat_delay = self.__das - return + return False if direction == "": self.__last_sideways_direction = "" self.__auto_repeat_delay = self.__das - return + return False if self.__last_sideways_direction != direction: self.__auto_repeat_delay = self.__das @@ -199,16 +200,18 @@ def handle_sideways_auto_repeat( self.move_sideways(direction) self.__kick_number = 0 self.__last_sideways_direction = direction - return + return True if self.__auto_repeat_delay > 0: self.__auto_repeat_delay -= 1 - return + return False if not mino_touching_side_func(direction, self): self.move_sideways(direction) self.__kick_number = 0 self.__auto_repeat_delay = self.__arr + return True + return False def move_down( self, is_position_valid: Callable[[List[Tuple[int, int]]], bool] diff --git a/tetr_cli/tetr_modules/sounds/sfx/all_clear.ftm b/tetr_cli/tetr_modules/sounds/sfx/all_clear.ftm new file mode 100644 index 0000000..b063693 Binary files /dev/null and b/tetr_cli/tetr_modules/sounds/sfx/all_clear.ftm differ diff --git a/tetr_cli/tetr_modules/sounds/sfx/all_clear.wav b/tetr_cli/tetr_modules/sounds/sfx/all_clear.wav new file mode 100644 index 0000000..d595d3c Binary files /dev/null and b/tetr_cli/tetr_modules/sounds/sfx/all_clear.wav differ diff --git a/tetr_cli/tetr_modules/sounds/sfx/double.ftm b/tetr_cli/tetr_modules/sounds/sfx/double.ftm index c114c8c..4ea83d8 100644 Binary files a/tetr_cli/tetr_modules/sounds/sfx/double.ftm and b/tetr_cli/tetr_modules/sounds/sfx/double.ftm differ diff --git a/tetr_cli/tetr_modules/sounds/sfx/double.wav b/tetr_cli/tetr_modules/sounds/sfx/double.wav index b1d6969..19a5ab3 100644 Binary files a/tetr_cli/tetr_modules/sounds/sfx/double.wav and b/tetr_cli/tetr_modules/sounds/sfx/double.wav differ diff --git a/tetr_cli/tetr_modules/sounds/sfx/t_spin_double.ftm b/tetr_cli/tetr_modules/sounds/sfx/hold.ftm similarity index 77% rename from tetr_cli/tetr_modules/sounds/sfx/t_spin_double.ftm rename to tetr_cli/tetr_modules/sounds/sfx/hold.ftm index 0c5ef26..777c681 100644 Binary files a/tetr_cli/tetr_modules/sounds/sfx/t_spin_double.ftm and b/tetr_cli/tetr_modules/sounds/sfx/hold.ftm differ diff --git a/tetr_cli/tetr_modules/sounds/sfx/hold.wav b/tetr_cli/tetr_modules/sounds/sfx/hold.wav new file mode 100644 index 0000000..033ac48 Binary files /dev/null and b/tetr_cli/tetr_modules/sounds/sfx/hold.wav differ diff --git a/tetr_cli/tetr_modules/sounds/sfx/move.ftm b/tetr_cli/tetr_modules/sounds/sfx/move.ftm new file mode 100644 index 0000000..e4faf8a Binary files /dev/null and b/tetr_cli/tetr_modules/sounds/sfx/move.ftm differ diff --git a/tetr_cli/tetr_modules/sounds/sfx/move.wav b/tetr_cli/tetr_modules/sounds/sfx/move.wav new file mode 100644 index 0000000..d6f4566 Binary files /dev/null and b/tetr_cli/tetr_modules/sounds/sfx/move.wav differ diff --git a/tetr_cli/tetr_modules/sounds/sfx/place_mino.ftm b/tetr_cli/tetr_modules/sounds/sfx/place_mino.ftm new file mode 100644 index 0000000..8117b47 Binary files /dev/null and b/tetr_cli/tetr_modules/sounds/sfx/place_mino.ftm differ diff --git a/tetr_cli/tetr_modules/sounds/sfx/t_spin_double.wav b/tetr_cli/tetr_modules/sounds/sfx/place_mino.wav similarity index 59% rename from tetr_cli/tetr_modules/sounds/sfx/t_spin_double.wav rename to tetr_cli/tetr_modules/sounds/sfx/place_mino.wav index 58b2b9a..84d3498 100644 Binary files a/tetr_cli/tetr_modules/sounds/sfx/t_spin_double.wav and b/tetr_cli/tetr_modules/sounds/sfx/place_mino.wav differ diff --git a/tetr_cli/tetr_modules/sounds/sfx/rotate.ftm b/tetr_cli/tetr_modules/sounds/sfx/rotate.ftm new file mode 100644 index 0000000..d69e6a4 Binary files /dev/null and b/tetr_cli/tetr_modules/sounds/sfx/rotate.ftm differ diff --git a/tetr_cli/tetr_modules/sounds/sfx/t_spin_triple.wav b/tetr_cli/tetr_modules/sounds/sfx/rotate.wav similarity index 51% rename from tetr_cli/tetr_modules/sounds/sfx/t_spin_triple.wav rename to tetr_cli/tetr_modules/sounds/sfx/rotate.wav index 2ec3313..2fceeb2 100644 Binary files a/tetr_cli/tetr_modules/sounds/sfx/t_spin_triple.wav and b/tetr_cli/tetr_modules/sounds/sfx/rotate.wav differ diff --git a/tetr_cli/tetr_modules/sounds/sfx/t_spin_single.ftm b/tetr_cli/tetr_modules/sounds/sfx/t_spin.ftm similarity index 100% rename from tetr_cli/tetr_modules/sounds/sfx/t_spin_single.ftm rename to tetr_cli/tetr_modules/sounds/sfx/t_spin.ftm diff --git a/tetr_cli/tetr_modules/sounds/sfx/t_spin_single.wav b/tetr_cli/tetr_modules/sounds/sfx/t_spin.wav similarity index 100% rename from tetr_cli/tetr_modules/sounds/sfx/t_spin_single.wav rename to tetr_cli/tetr_modules/sounds/sfx/t_spin.wav diff --git a/tetr_cli/tetr_modules/sounds/sfx/t_spin_double_old.ftm b/tetr_cli/tetr_modules/sounds/sfx/t_spin_double_old.ftm new file mode 100644 index 0000000..4ea83d8 Binary files /dev/null and b/tetr_cli/tetr_modules/sounds/sfx/t_spin_double_old.ftm differ diff --git a/tetr_cli/tetr_modules/sounds/sfx/t_spin_triple.ftm b/tetr_cli/tetr_modules/sounds/sfx/t_spin_triple_old.ftm similarity index 100% rename from tetr_cli/tetr_modules/sounds/sfx/t_spin_triple.ftm rename to tetr_cli/tetr_modules/sounds/sfx/t_spin_triple_old.ftm diff --git a/tetr_cli/tetr_modules/sounds/sfx/triple.ftm b/tetr_cli/tetr_modules/sounds/sfx/triple.ftm new file mode 100644 index 0000000..6c97bad Binary files /dev/null and b/tetr_cli/tetr_modules/sounds/sfx/triple.ftm differ diff --git a/tetr_cli/tetr_modules/sounds/sfx/triple.wav b/tetr_cli/tetr_modules/sounds/sfx/triple.wav new file mode 100644 index 0000000..22e542c Binary files /dev/null and b/tetr_cli/tetr_modules/sounds/sfx/triple.wav differ