Questions tagged [playing-cards]
Programming questions involving digitally-represented playing cards. This includes representing cards and decks in data structures, user interfaces for manipulating cards in a virtual fashion, and implementing correct algorithmic shuffling.
373 questions
7votes
4answers
942views
Project Euler #54: class for poker hands
I'm working right now on Project Euler problem 54, and I figured that this was the perfect opportunity to try to work with classes. This is my first time, so I'm sure that there are a lot of style, ...
5votes
1answer
166views
Poker Lite (AOC 2023 Day 7) using structs wrapped in an enum
I've been trying to learn Rust by working through Advent of Code 2023, specifically for day 7, part 1, here. It's Poker Lite: You're given a list of hands. The input is formatted as ...
7votes
4answers
2kviews
A simplified Blackjack C++ OOP console game
This is my first time writing something bigger with OOP. A simplified version of the card game BlackJack. Hand splitting currently isn't implemented. File tree ...
10votes
7answers
1kviews
Rudimentary black jack game implementation
I started the 100 Days of Code: The Complete Python Bootcamp about a week ago. I finished day 11, and I wrote a rudimentary blackjack game. I'm just looking for some advise on how I did. Am I showing ...
3votes
2answers
295views
Text-based blackjack in python
This is code for a text-based game of Blackjack. I would also like advice on how can I implement a betting system in this program. For example starting with an amount of chips and choosing how much of ...
3votes
2answers
133views
Simple Blackjack game with card art
I have reached a point in my course that I feel I could use some feedback as to how my code looks and hopefully some direction on some best practice methodology going forward. I know I have a long way ...
3votes
1answer
253views
Simple blackjack program in Java
I wrote this blackjack game for my APCSA class (already submitted) and was wondering if anyone had feedback on what parts of it are improperly written. My main concern is the fact that I am printing ...
2votes
1answer
120views
Poker Hand Evaluation evaluation
Several days ago, a question on this topic was posted to SO. The problem turned out to be the OP's test cases did not reveal a deficiency in the code. This challenge caught my attention. Writing the ...
3votes
1answer
156views
Combo Matching in a digital implementation of Reiner Knizia's 'Schotten Totten'
I'm implementing Reiner Knizia's card game 'Schotten Totten' in Python. It's a card game for two players, where you compete to claim boundary stones between you and your opponent by forming poker-like ...
1vote
2answers
105views
Create a "similar" hand of cards
Is there a meaningful way to simplify and refactor this function? It sorts the flop by rank and assigns a new suit according to the sorted rank order. Higher ranked cards will be assigned spades, ...
3votes
1answer
163views
Terminal Based Blackjack
This is my attempt at a terminal based blackjack game. Currently, the game does not support betting, although I intend to add it in the future. I would very much appreciate general feedback, but I am ...
1vote
1answer
201views
Terminal War Game
First I would like to thank everyone for whatever help you may offer me. In full disclosure this is a project for a bootcamp class I have. My problem is, and I've asked them about this, that they aren'...
2votes
2answers
2kviews
Poker hand valuator in Python
As you will probably notice very quickly from the code below, I'm not very experienced coder. Below is my attempt at valuating poker hands in Python. The code below may not be pretty but it seems to ...
0votes
1answer
85views
typescript poker filter pairs from 7 card deck
I am making a poker game and poker-evaluator that I am using to tell me only the outcome from the cards ...
1vote
1answer
159views
Simple Blackjack game
This is my simple Blackjack game made in Python. I would love some feedback to write better code. ...