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.

11 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
59 views

Mahjong hand completeness checking algorithm

As a summer project, I have been working on a small-scale, console-based version of Mahjong (the Rummy-like hand completion game, and not the solitaire version). While having prior knowledge of the ...
3
votes
0answers
120 views

Java implementation of Spider Solitaire

I recently cloned a classical Spider Solitaire game from Microsoft Windows XP. I implemented almost all features of the game. Please tell me anything I can do in order to improve my coding style. ...
3
votes
0answers
115 views

Playing card object

I am writing this class to eventually create a playing card game (Spades) and also to utilize the object oriented paradigm. This was my attempt to model a card as an object. Each card has a suit and a ...
3
votes
0answers
79 views

Simpler version of BlackJack game - first oop

I am learning Python for a few weeks. Last time I started object-oriented programming and I feel like it is really hard for me to write relation between methods and attributes different objects. I ...
3
votes
0answers
455 views

Hint generation code for freecell game

I am writing a text-based freecell game in python 3. I am looking for a way to generate hints. A hint should simply be all the possible moves that you can make, excluding moving a card to a free cell (...
2
votes
0answers
133 views

One-handed Solitaire Game Choice Generator

I want to test some different endgame scenarios for one-handed Solitaire where the removal of the cards if the suit or value match is optional. I've written a simple generator which yields at the ...
2
votes
0answers
65 views

My Jack slapped back. (tkInter learning project follow up)

This is a follow up to my question here about my slap-jack program. I've tried to implement the suggestions that were given in the accepted answer. (Though I never was able to figure out how to ditch <...
1
vote
0answers
35 views

Rust trait implementations for a Blackjack game

I am learning Rust. I have build a simple game (Blackjack) to get acquainted. The following code is the code which runs the game logic. The code is part of the larger codebase and works. In the rest ...
1
vote
0answers
66 views

Blackjack simulator for Probability of a dealer bust for each starting card

I came up with this solution to another exercise out of John Zelle's Programming book. ...
1
vote
0answers
381 views

Sorting cards by suit and value using Shell Sort

The question description: put a deck of cards in order by suit (in the order spades, heart, clubs, diamonds) and by rank within each suit, with the restriction that the card must be laid out face down ...
1
vote
0answers
37 views

Blackjack Insurance Object that implements Null Object Pattern via __new__

This example of a blackjack insurance object is typical of how I find myself writing classes in Python. I particularly wanted some feedback on my use __new__ to ...