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.

Filter by
Sorted by
Tagged with
1
vote
1answer
432 views

2vs2 Poker Hand One Pair Winner Algorithm

I wrote this algorithm to determine the winning hand of two players going head to head with a hand of One Pair. Note that the hand is sorted once it is given out, and the algorithm has to compare the ...
6
votes
3answers
11k views

Blackjack card game

It's been a long while since I've done any Python programming so I thought I'd start with a simple Blackjack game. Any comments on how I can make this more readable? Use more methods perhaps? ...
8
votes
4answers
3k views

Poker game classes

I've built this two classes for a Poker game on Android and I would appreciate some feedback on my code. Have no mercy. The harsher you are, the better. Feel free to add your number of WTFs/minute. ...
3
votes
1answer
4k views

Basic Poker Draw

I humbly ask that you review my simple (albeit a little over-done) program. The intention is to create a deck of cards, shuffle them, and draw the first five off the deck as a poker hand. Can you ...
3
votes
2answers
3k views

Card class for card games

I'm attempting to improve my coding style by concentrating on simple and focused OOP client-server interfaces and error handling - atm in the context of designing a Blackjack game. I'm starting with ...
5
votes
3answers
382 views

Should I design my enumeration in some way that indicates what the highest value is?

This is a subtle question about design in which I want to find the most elegant and appropriate solution. I have an enumeration representing a French card deck (see code below). With it I need to do ...
2
votes
2answers
11k views

Blackjack casino game

Blackjack (twenty-one) is a casino game played with cards. The goal of the game to draw cards that total as close to 21 points as possible without going over. All face cards count as 10 points, ...
4
votes
3answers
484 views

King's Cup game

I just wrote a small card game in JavaScript, CSS and HTML. This is kind of my first project that I have cared about front-end. So I got things to work, but I am sure that this is not the smartest way ...
7
votes
1answer
4k views

Yahtzee Code Kata in Python

I tried a Yahtzee kata in Python the other day. I'm not particularly experienced in Python (C# is my main language) so I'd be interested in any feedback as to how I could have done things better. In ...
22
votes
2answers
16k views

Texas Hold'em in Java

I have been a programmer for 12 years, mainly ERP software and C development and am looking to make a career/specialty change to Java. I've read it countless times if you want to learn a new language ...