28 lines
611 B
Python
28 lines
611 B
Python
#!/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() |