Add the console game loop and entry point

Add show_round, ask_choice and play_game with injectable input and
output, and make python -m higher_lower play a game. Each account is
shown once per game; a wrong guess or running out of accounts ends it.
Invalid input is re-asked. Ctrl+C and Ctrl+D leave with a goodbye.
Cover the loop with scripted tests (36 passing).

Task: MIL-003#1
Task: MIL-003#2
Task: MIL-003#3
Task: MIL-003#4
Task: MIL-003#5
Closes #12
Closes #13
Closes #14
Closes #15
Closes #16
This commit is contained in:
2026-10-04 23:49:09 +08:00
parent c7164feab1
commit 0ada1588ee
5 changed files with 278 additions and 6 deletions
+2 -2
View File
@@ -12,5 +12,5 @@ def test_package_imports() -> None:
def test_entry_point_is_callable() -> None:
"""@brief The entry point exists and can be called."""
assert entry_point.main() is None
"""@brief The entry point exists; importing it does not start a game."""
assert callable(entry_point.main)