Skip to content

Implementation of Poker in Python 3.10

License

Notifications You must be signed in to change notification settings

electrobullet/pypoker

Repository files navigation

pypoker

code_checks_status

Overview

Implementation of Poker in Python 3.10

Demonstration

(venv) python poker.py
User hand: [('7', 'H'), ('7', 'D'), ('9', 'C'), ('K', 'S'), ('A', 'C')] - pair

Replace ('7', 'H')? [y / n] n
Replace ('7', 'D')? [y / n] n
Replace ('9', 'C')? [y / n] y
Replace ('K', 'S')? [y / n] y
Replace ('A', 'C')? [y / n] y

Computer hand: [('3', 'S'), ('4', 'H'), ('6', 'C'), ('Q', 'D'), ('Q', 'C')] - pair 

User hand: [('5', 'D'), ('5', 'S'), ('7', 'H'), ('7', 'D'), ('J', 'C')] - two pairs

User wins!