https://github.com/stablecoder/deck-o-cards
A simple proof-of-concept of a memory-minimized deck of cards with shuffle.
https://github.com/stablecoder/deck-o-cards
Last synced: 10 months ago
JSON representation
A simple proof-of-concept of a memory-minimized deck of cards with shuffle.
- Host: GitHub
- URL: https://github.com/stablecoder/deck-o-cards
- Owner: StableCoder
- License: apache-2.0
- Created: 2019-06-16T19:03:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-06-16T19:05:00.000Z (over 6 years ago)
- Last Synced: 2025-01-13T13:52:29.680Z (12 months ago)
- Language: C++
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Deck'o'Cards
This is a simple implementation of a deck of cards, with the minimum possible use of memory was a challenge set by a fellow co-worker.
Any player's hand can be represented within 8 bytes, and a deck with 16 + 24 bytes with the ability to peek upto several future cards, and to reshuffle. (Without the ability to peek, it can be just 16 bytes).
This does, however, incur a higher computational cost, but such is the eternal struggle with computers of memory vs cycles.