This commit is contained in:
2025-09-26 16:55:57 +08:00
parent 57a7e9216e
commit 0597239207
12 changed files with 1412 additions and 4 deletions

28
task4_main.py Normal file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env python3
"""
Short Deck Poker Hand Evaluation Script
Usage: python shortdeck_main.py "6sKs AhAdAc6s7s"
"""
import sys
from shortdeck import ShortDeckHandEvaluator
from poker.hand_ranking import HandType
def main():
if len(sys.argv) != 2:
print("输入: python shortdeck_main.py \"AsKs QhQdQc6s7s\"")
sys.exit(1)
try:
hand_input = sys.argv[1]
result = ShortDeckHandEvaluator.evaluate_from_input(hand_input)
print(str(result))
except Exception as e:
print(f"Error: {e}")
sys.exit(1)
if __name__ == "__main__":
main()