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
34
votes
2answers
7k views

Weekend Challenge - Poker Hand Evaluation

Weekend Challenge #2 - Poker Hand Evaluation Very early I decided to support the usage of wild jokers, even though I knew that this was going to lead to trouble more work. I also wanted to support ...
12
votes
2answers
3k views

Determining winning hand in poker

After having reviewed this question, I recalled that I haven't solved Project Euler's problem 54. So I did it, however, I fount out that implementing the exact rules is rather tricky. So I ...
7
votes
2answers
3k views

Project Euler - Problem 54: testing poker hands

This was a very fun and thought provoking problem, and I'm quite proud of the way I was able to pull it off. I broke it down into 2 parts, testing and comparing. Testing each group of cards for ...
22
votes
1answer
2k views

Weekend Challenge: Ruby Poker Hand Evaluation

I'm late to this weekend challenge (sorry), but since it's all in good fun, I hope that's ok. I'm no poker player, though, so I may have completely overlooked something. The ...
13
votes
4answers
2k views

Use of templates with templated Deck class

I have previous revisions of my deck of cards project, but I may not need to link them here since the emphasis is on the use of templates. I've never used them before until now, and I like how ...
13
votes
2answers
13k views

Card Deck class for a Poker game

I have recently finished creating my own Deck class for my Poker game. It works the way I want it to, but I would like to know if I can make it better and/or more ...
10
votes
5answers
2k views

Beginnings of a Poker hand classifier part 2

Part 1 - Beginnings of a Poker hand classifier I'm a beginner programmer I've been working on a poker hand classifier to improve my object orientation and programming skills, I've improved and ...
8
votes
3answers
38k views

Text-based Blackjack game in Python

I am new to programming in Python and wrote a simple Blackjack project. I am looking for experienced peers to provide a high level code review about the overall design patterns and proper usages. The ...
4
votes
1answer
379 views

Project Euler #54 solution - follow-up

This is my second solution to Project Euler #54. You can find the original post here. Brief problem summary: The file, poker.txt, contains one-thousand random hands dealt to two players. Each line ...
3
votes
4answers
1k views

Poker Hand Evaluator

Poker is 52 cards - 4 suite and 13 rank: Hand is exaclty 5 cards Order of hands Straight-flush - all same suite and in order Quad four of same rank Boat three of one rank and two of another rank ...
6
votes
1answer
3k views

Determining winner and winning hand in poker (holdem)

I wrote couple classes that calculate winner, winning hand and winning hands rank (straight, flush, fullhouse etc.). I searched for something similar, but only found posts where five cards are used, ...
6
votes
4answers
2k views

Beginnings of a Poker hand classifier

For practicing/learning object orientation, I made a Card class and am practicing doing stuff with it such as shuffling decks and dealing hands etc... I have a ...
3
votes
2answers
3k views

Javascript based War card game

I'm working on a game of War for a potential employer and I was hoping someone could review my code and provide feedback on my code. HTML/CSS ...
2
votes
2answers
414 views

Console single player blackjack versus a dealer again

This is the second pass on this. pass one A single player versus a dealer. It does not perform bets - it only track wins and losses and has no splitting. Other than that I tried to get it all in. I ...
2
votes
1answer
716 views

Javascript based War card game - final

This will be my last submission of this project for review as it's being submitted this evening. I have updated my code based on feedback from other users. I would appreciate any and all feedback ...
1
vote
1answer
192 views

JavaScript-based War card game - follow-up

Original Question I have updated my code based on feedback from other users and am submitting this question for re-evaluation. HTML ...
25
votes
5answers
20k views

Object Oriented Design of Card Deck

I am designing classes for a game with card deck. Please review my code. Each Player gets Hand of cards The Deck can be shuffled and cards are dealt one at a time from the deck and added to the ...
28
votes
7answers
27k views

Basic OOP Poker - Deck, Cards and Hands

I decided it would be interesting to simulate a game of Poker. Baby steps at the moment, and eventually I'll attempt to turn it into a GUI. The code I have so far is very basic such as populating a ...
15
votes
4answers
30k views

First attempt at a Blackjack game

I am not happy with this code as I am sure there are better ways to do what I'm trying to achieve. I'm a beginner and I've used what I know to date to complete this. ...
9
votes
2answers
479 views

My second game: War Card game V.1

I'm a beginner programmer that's really motivated at the moment. I made this in two days and I'm really proud of it because I never used any tutorials or any online help. Just good ol' grey matter and ...
4
votes
1answer
1k views

Second attempt at a Blackjack game

I posted yesterday about my first attempt at a Blackjack game. After I received much helpful advice I tried my best to fix up my code. I was wondering what you would think about round two! Edit: I ...
16
votes
1answer
1k views

Go Fish game written in Go

A couple months back I made a go fish game in Go, just for the sake of that pun. It was pretty poorly done and made experienced Go-ers cry when they looked at it. I rewrote some of it to be more ...
11
votes
2answers
3k views

Poker Hand Evaluator, take 2

This is following up on my previous attempt, which was admittedly done fast and not-so-well. This code attempts to allow comparing two poker hands to determine a winner, not only evaluating a given ...
11
votes
1answer
805 views

Card-fighting game

I am currently building my first game/app in javascript. It is a very simple script that has about 130~ lines of code. I feel like what I did so far is not optimized, can anyone please help me ...
7
votes
3answers
29k views

My first finished Python program: a deck of cards

I've recently started learning how to code in Python, and have even more recently learned the basics of object-oriented programming. Feeling inspired, I started on a program that would generate random ...
6
votes
3answers
10k views

Simple Blackjack game in Python 3.4

I made a simple Blackjack game in Python 3.4.3. I'm a beginner, so it would be awesome if you could rip up my code and tell me everything I did wrong. I know there's no insurance for when the dealer ...
4
votes
2answers
2k views

Poker hand identifier

Inspired by this post (along with a number of other people by the looks of it), I created a poker hand identifier with a very similar format. Note that the syntax of the hands is a little different to ...
4
votes
2answers
4k views

OOP Design of a Generic Deck of Cards

I have structured a package containing interfaces that could be implemented and used for any card game. I'm interested in knowing if I'm on the right track OOP-wise, or If I need to change my design....
3
votes
6answers
2k views

Blackjack game interview task

As part of a recent interview, I was assigned to write a small BlackJack program. After submitting the solution, I received an answer that "the solution was functionally OK, but was way below their ...
16
votes
4answers
13k views

Simple Blackjack game in console

edit: After receiving the great feedback, I have tried to make my code better. The new version can be seen here: Simple Blackjack game in console (update) This is one of my first finished projects ...
14
votes
2answers
563 views

Blackjack with card representation visuals

To try and practice OOP, I've heard making a blackjack game can be really helpful; which it has been. I don't know how 'advanced' an implementation this is; but it has all the standard features, like ...
12
votes
5answers
2k views

Deck of cards with shuffle and sort functionality

Going through Head First C#'s Chapter 8: Enums and Collections, I learned about List<T>, as well as IComparable<T> ...
12
votes
1answer
706 views

Project Euler #54 - Poker Streams

This challenge posted by Durron597 intrigued me, and inspired me to answer his question, and also to determine whether a more functional approach was available for poker hand ranking. The problem ...
10
votes
3answers
3k views

Poker Hand Evaluation - Finding a straight

Weekend Challenge #2 - Poker Hand Evaluation Finding a straight with wildcards Because of a size limit on Code Review I have to split my weekly challenge result in two, and here is a part where I ...
10
votes
4answers
847 views

Another attempt at a Blackjack game

This is a follow up question to this one. I have been working on this game for some time, and now I would like it to be reviewed. Most importantly, I want to know about my code readability, ...
9
votes
2answers
3k views

Project Euler #54 Solution

This is not the latest question in iterative code review of this program. You can find the latest answer here. Here's my solution to Project Euler #54. Click the link for the full project description ...
9
votes
2answers
1k views

WinForms Poker (complete project)

I have quite huge question/favor to ask but I hope I can get some useful answers. This is my first complete project, I'm still learning C#, my first programming language. I'm afraid that there will ...
8
votes
3answers
2k views

Macau Card Game

I've implemented a card game called Macau. This is a follow-up from this topic, where I tried to get the game's design right before actually implementing it. Even if the game is presented on that ...
7
votes
1answer
637 views

Blackjack game made in Python 3

This is a simple blackjack game I finished making using Python. I hope you like it and I'm open to any suggestions or critiques you would give me. ...
6
votes
1answer
1k views

Defining what combination the user have in Poker

I'm developing a C# Poker app and I currently use the modulus and the divide operator % , / and dividing by 4 because there are 4 cards of the same type but with ...
5
votes
2answers
1k views

My attempt at a Blackjack game

Please also see the new version here So I've been trying to make a blackjack game as my first attempt at an OOP project. The program is working, but not yet finished as it is lacking three major ...
4
votes
2answers
11k views

Poker Hand Evaluator Challenge

This week's review challenge is a poker hand evaluator. I started by enumerating the possible hands: ...
2
votes
1answer
2k views

Simple Blackjack game in console (update)

A couple of days ago I posted the code for my Simple Blackjack console game. I have got some good reviews and since then I have been trying to improve the code. That previous question can be seen here:...
9
votes
3answers
206 views

Console Blackjack game, without split or betting system for now

I never programmed in my life, and I am currently self teaching myself some C++ by reading books, online free classes and googling. After beginning to read about OOP and classes, and after seeing that ...
7
votes
2answers
800 views

Allow console draw poker game to output more hands

I'm an absolute python beginner. I created a draw poker game that works fine up to about ten thousand hands, at which point it starts to freeze and not generate the hands. Given that straight flushes ...
6
votes
3answers
409 views

Deck and Card classes and member-accessing with one header

Previous review of this project: Card Deck class for a Poker game - version 2 This time, I considered combining both classes into one header file so that I can reduce my use of ...
5
votes
1answer
2k views

Deck of cards implementation

Update: Simple Blackjack implementation I was playing Blackjack in a phone app and decided to try to do the game in Java, using the console for a start. So far I'd like to review the deck of cards ...
5
votes
1answer
111 views

Lastest version of my Blackjack game

This is the latest version of my Blackjack game that uses a MySQL database to store user info. I did everything I was recommended in my previous post, added a ranking system and also fixed a bug where ...
5
votes
1answer
177 views

Blackjack game - follow-up

This is an updated version of my previously posted "Blackjack game made in Python 3". I think I did almost everything @Austin Hastings recommend me to do and I hope you like it. ...
5
votes
1answer
125 views

Tally Calculator for Baloot in F#

This is a tally calculator for the Saudi card game Baloot. As in, they're a set of functions so that the user would provide their winnings at the end of a round (card captured, projects declared, etc) ...