This commit is contained in:
2025-09-24 16:54:52 +08:00
parent 45f86ba95e
commit 57a7e9216e
22 changed files with 1647 additions and 102 deletions

28
shortdeck_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()