Skip to content
Merged

Work #27

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "tetr_cli"
version = "1.0.0"
version = "1.0.1-2"
description = "Setup script for the tetr_cli package."
authors = [
{ name = "Airun_Iru", email = "hugo_s_tanaka@yahoo.com" }
Expand All @@ -18,7 +18,7 @@ dependencies = [
"wcwidth>=0.1.7",
'windows-curses>=2.2.0; platform_system == "Windows"'
]
requires-python = ">=3.8"
requires-python = ">=3.8, <3.14"
readme = "README.md"

[tool.setuptools.packages.find]
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

setup(
name="tetr_cli",
version="1.0.0",
version="1.0.1-2",
packages=find_packages(),
entry_points={"console_scripts": ["tetr_cli = tetr_cli.starter:starter"]},
python_requires=">=3.7",
python_requires=">=3.8, <3.14",
install_requires=[
"ansicon>=1.83.0",
"jinxed>=1.1.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
from tetr_cli.tetr_modules.modules.database import set_setting

OPTION_TO_ACTION: Dict[str, Dict[str, str]] = {
"Go_Back": {"action": "Gameplay_Options", "sound": "select_back"},
"Go_Back": {"action": "Graphic_Options", "sound": "select_back"},
}

for mino_style in MINO_TO_GHOST.keys():
OPTION_TO_ACTION[mino_style] = {
"action": "Gameplay_Options",
"action": "Graphic_Options",
"sound": "select_confirm",
}

Expand Down
22 changes: 11 additions & 11 deletions tetr_cli/tetr_modules/modes/solo/sprint_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,6 @@ def play_mode(self, stdscr: window, pressed_keys: Set[str]) -> None:
das=self.__das,
arr=self.__arr,
)
if self.check_game_over():
self.mode = "game_over"
self.display_game_over(stdscr)
self.sound_action["BGM"] = ["stop"]
return

self.check_keyinput_pressed(pressed_keys=pressed_keys)
if not self.current_mino:
Expand Down Expand Up @@ -304,12 +299,6 @@ def increment_frame(self, stdscr: window, pressed_keys: Set[str]) -> None:
if check_max_yx[0] < MIN_Y or check_max_yx[1] < MIN_X:
return

if self.check_clear():
self.mode = "cleared"
self.display_game_cleared(stdscr)
self.sound_action["BGM"] = ["stop"]
return

if self.mode == "game_over":
if self.get_user_keybind("menu_confirm", menu_mode=True) & pressed_keys:
self.action["transition"] = ["Score_Screen"]
Expand Down Expand Up @@ -370,6 +359,17 @@ def increment_frame(self, stdscr: window, pressed_keys: Set[str]) -> None:
self.countdown_mode(stdscr)
return

if self.check_game_over():
self.mode = "game_over"
self.display_game_over(stdscr)
self.sound_action["BGM"] = ["stop"]
return
if self.check_clear():
self.mode = "cleared"
self.display_game_cleared(stdscr)
self.sound_action["BGM"] = ["stop"]
return

self.play_mode(stdscr, pressed_keys)

self.__time += 60 // self.fps_limit
Expand Down
22 changes: 11 additions & 11 deletions tetr_cli/tetr_modules/modes/solo/ultra_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,11 +212,6 @@ def play_mode(self, stdscr: window, pressed_keys: Set[str]) -> None:
das=self.__das,
arr=self.__arr,
)
if self.check_game_over():
self.mode = "game_over"
self.display_game_over(stdscr)
self.sound_action["BGM"] = ["stop"]
return

self.check_keyinput_pressed(pressed_keys=pressed_keys)
if not self.current_mino:
Expand Down Expand Up @@ -312,12 +307,6 @@ def increment_frame(self, stdscr: window, pressed_keys: Set[str]) -> None:
if check_max_yx[0] < MIN_Y or check_max_yx[1] < MIN_X:
return

if self.check_clear():
self.mode = "cleared"
self.display_game_cleared(stdscr)
self.sound_action["BGM"] = ["stop"]
return

if self.mode == "game_over":
if self.get_user_keybind("menu_confirm", menu_mode=True) & pressed_keys:
self.action["transition"] = ["Score_Screen"]
Expand Down Expand Up @@ -378,6 +367,17 @@ def increment_frame(self, stdscr: window, pressed_keys: Set[str]) -> None:
self.countdown_mode(stdscr)
return

if self.check_game_over():
self.mode = "game_over"
self.display_game_over(stdscr)
self.sound_action["BGM"] = ["stop"]
return
if self.check_clear():
self.mode = "cleared"
self.display_game_cleared(stdscr)
self.sound_action["BGM"] = ["stop"]
return

self.play_mode(stdscr, pressed_keys)

self.__time -= 1
Expand Down