Implementation is similar to the rules given by Craig Powers.
Notable differences (to match how I learned in high school calculus) include:
- Minimum bid of
hand size / 2(which can be stuck to the dealer) - Trump isn't announced until after bidding has concluded
- Shooters and loners are separate bids
- Shooters are worth
± 1.5 * hand sizepoints - Loners are worth double the hand size if you win and subtract the same as a shooter if you lose
- Shooters are a mandatory donation (think Hearts)
- Shooting cards to your teammate happens between trump declaration and the first hand
- The lone player in a shooter will have spare cards at the hand's end
- Shooters are worth
- Winner of bid leads the first hand
- Winning your bid gives you
(tricks earned + 2)points
clickis the only external dependencyblackis inrequirements.txtfor developers: if you submit a PR, please blacken your code firsteuchre.py --helpdisplays the other options to customize gameplay-hchanges the number of players for 3 or 6 hand games-vmodifies the victory thresholds, useful if you're short on time--all-botslets the computer play itself and puts the output to a file
- Running
euchre.pywithout options plays a 4-handed game with one human player in a random seat - There is a walrus or two, so Python 3.8 is required
See hearts.py --help for all the options.
It supports something like MS Hearts.exe and two Spot Hearts variants.
Python 3.9's upcoming a | b syntax for merging dictionaries may be helpful.
This needs someone else who is familiar with the rules to implement it or a variant
See Bridge.
Maybe I'll get around to this one eventually.