Deck of Many Things Python Code

Introduction

I think I mentioned in my post a couple of weeks ago that I wanted to try to write a Deck of Many Things Python program. You’ll just have to click the link and give me another page view if you want to know for sure. Muahahahahah! In any case, I finally got a chance to sit down and start to put together some code for the project.

I’m not one for resolutions. However, I looked through my Google calendar and talked with ChatGPT about a way to schedule my hobbies so that I have time each day to work on them. Lego and Puzzles on Tuesday, miniatures on Wednesday. That sort of thing. Thursdays were supposed to be coding, but I only actually finally got around to sitting down and playing with it this morning.

The Code

Python
import random

deck = ["Construct", "Balance", "Comet", "DonJon", "Euryale", "Fates", "Flames", "Fool", "Gem", "Jester", "Key", "Knight", "Moon", "Puzzle", "Rogue", "Ruin", "Sage", "Skull", "Star", "Sun", "Talons", "Throne", "Void", "Tavern", "Mine", "Expert", "Maze", "Map", "Mage", "Lance", "Humanoid", "Giant", "Fiend", "Fey", "Elemental", "Dragon", "Door", "Crossroads", "Corpse", "Celestial", "Cavern", "Campfire", "Bridge", "Book", "Beast", "Aberration", "Monstrosity", "Ooze", "Path", "Pit", "Plant", "Priest", "Prisoner", "Ring", "Shield", "Ship", "Staff", "Stairway", "Statue", "Temple", "Tomb", "Tower", "Tree", "Undead", "Warrior", "Well"]
orientation = ["Upright", "Reversed"]

random.shuffle(deck)
print(deck[random.randint(0,len(deck))])
print(random.choice(orientation))
print("Find the card in The Deck of Many Things")
print("Card Reference Guide for an interpretation.")

The Output

The Verdict

I admit that the Deck of Many Things Python code isn’t much right now. But, this is my first time planning and implementing code that wasn’t already written. So, for a first attempt, I think that I did a pretty good job and it does what I wanted the early version to do. Going forward, I want to add the interpretation for each card to remove the need for the book. I also want to add an option for other card spreads further down the line. Eventually, I want to make it visual and maybe turn it into an app. Keep an eye on the page for updates.

One Last Note

I just got the idea to include the page number with the card to make referencing the guide easier. I’m very excited for everything that’s coming with this project.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.