Last active
March 28, 2023 16:51
-
-
Save brunurd/02be90261af52d9cef402412de065ddd to your computer and use it in GitHub Desktop.
Awful Game Theme Generator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"attachments": {}, | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Awful Game Theme Generator\n" | |
] | |
}, | |
{ | |
"attachments": {}, | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"The data dictionary of topics:\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"topics = {\n", | |
" \"videoGameGenres\": [\n", | |
" \"Role-playing\",\n", | |
" \"Survival\",\n", | |
" \"Sports\",\n", | |
" \"Simulation\",\n", | |
" \"Fighting\",\n", | |
" \"Horror\",\n", | |
" \"Music\",\n", | |
" \"Strategy\",\n", | |
" \"Casual\",\n", | |
" \"Shooter\",\n", | |
" \"Racing\",\n", | |
" \"Open-world\",\n", | |
" \"Dating sim\",\n", | |
" \"Interactive fiction\",\n", | |
" \"Educational\",\n", | |
" \"Tower defense\",\n", | |
" \"MOBA\",\n", | |
" \"Stealth-action\",\n", | |
" \"Visual novel\",\n", | |
" \"Puzzle-platformer\",\n", | |
" \"Fighting game\",\n", | |
" \"Sandbox\",\n", | |
" \"Card game\",\n", | |
" \"Real-time strategy\",\n", | |
" \"Third-person shooter\",\n", | |
" ],\n", | |
" \"animals\": [\n", | |
" \"Platypus\",\n", | |
" \"Tasmanian devil\",\n", | |
" \"Komodo dragon\",\n", | |
" \"Lemming\",\n", | |
" \"Kangaroo\",\n", | |
" \"Meerkat\",\n", | |
" \"Octopus\",\n", | |
" \"Zebra\",\n", | |
" \"Walrus\",\n", | |
" \"Crocodile\",\n", | |
" \"Panda\",\n", | |
" \"Arctic fox\",\n", | |
" \"Ostrich\",\n", | |
" \"Toucan\",\n", | |
" \"Alpaca\",\n", | |
" \"Chameleon\",\n", | |
" \"Puma\",\n", | |
" \"Hammerhead shark\",\n", | |
" \"Gorilla\",\n", | |
" \"Manta ray\",\n", | |
" \"Narwhal\",\n", | |
" \"Hyena\",\n", | |
" \"Capybara\",\n", | |
" \"Firefly\",\n", | |
" \"Bald eagle\",\n", | |
" ],\n", | |
" \"feelings\": [\n", | |
" \"Empathy\",\n", | |
" \"Envy\",\n", | |
" \"Melancholy\",\n", | |
" \"Puzzlement\",\n", | |
" \"Remorse\",\n", | |
" \"Awe\",\n", | |
" \"Amusement\",\n", | |
" \"Contempt\",\n", | |
" \"Ecstasy\",\n", | |
" \"Frustration\",\n", | |
" \"Longing\",\n", | |
" \"Numbness\",\n", | |
" \"Resentment\",\n", | |
" \"Satisfaction\",\n", | |
" \"Tenderness\",\n", | |
" \"Bitterness\",\n", | |
" \"Confidence\",\n", | |
" \"Disappointment\",\n", | |
" \"Elation\",\n", | |
" \"Grief\",\n", | |
" \"Hopefulness\",\n", | |
" \"Nostalgia\",\n", | |
" \"Overwhelm\",\n", | |
" \"Serenity\",\n", | |
" \"Zeal\",\n", | |
" ],\n", | |
" \"professions\": [\n", | |
" \"Architect\",\n", | |
" \"Dentist\",\n", | |
" \"Journalist\",\n", | |
" \"Chef\",\n", | |
" \"Plumber\",\n", | |
" \"Actor\",\n", | |
" \"Astronomer\",\n", | |
" \"Carpenter\",\n", | |
" \"Social worker\",\n", | |
" \"Electrician\",\n", | |
" \"Photographer\",\n", | |
" \"Fashion designer\",\n", | |
" \"Physiotherapist\",\n", | |
" \"Software engineer\",\n", | |
" \"Lawyer\",\n", | |
" \"Accountant\",\n", | |
" \"Geologist\",\n", | |
" \"Nurse\",\n", | |
" \"Teacher\",\n", | |
" \"Psychologist\",\n", | |
" \"Entrepreneur\",\n", | |
" \"Veterinarian\",\n", | |
" \"Writer\",\n", | |
" \"Surgeon\",\n", | |
" \"Economist\",\n", | |
" \"Graphic designer\",\n", | |
" ],\n", | |
" \"places\": [\n", | |
" \"Mansion\",\n", | |
" \"Cottage\",\n", | |
" \"Library\",\n", | |
" \"Bank\",\n", | |
" \"Skyscraper\",\n", | |
" \"Hospital\",\n", | |
" \"Warehouse\",\n", | |
" \"Museum\",\n", | |
" \"Stadium\",\n", | |
" \"Castle\",\n", | |
" \"Hotel\",\n", | |
" \"Church\",\n", | |
" \"Gas station\",\n", | |
" \"Lighthouse\",\n", | |
" \"Train station\",\n", | |
" \"Department store\",\n", | |
" \"Police station\",\n", | |
" \"Theater\",\n", | |
" \"Art gallery\",\n", | |
" \"Power plant\",\n", | |
" \"Aquarium\",\n", | |
" \"University\",\n", | |
" \"Casino\",\n", | |
" \"Observatory\",\n", | |
" \"Prison\",\n", | |
" \"City hall\",\n", | |
" ],\n", | |
"}\n" | |
] | |
}, | |
{ | |
"attachments": {}, | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"The generation algorithm:\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"import random\n", | |
"\n", | |
"\n", | |
"def random_item_of_array(items):\n", | |
" return random.choice(items)\n", | |
"\n", | |
"\n", | |
"def get_random_word_of_a_topic(topic):\n", | |
" return random_item_of_array(topics[topic]).lower() if topic in topics.keys() else \"\"\n", | |
"\n", | |
"\n", | |
"def generateTheme():\n", | |
" return f'A {get_random_word_of_a_topic(\"videoGameGenres\")} game of a {get_random_word_of_a_topic(\"professions\")} {get_random_word_of_a_topic(\"animals\")} feeling {get_random_word_of_a_topic(\"feelings\")} at {get_random_word_of_a_topic(\"places\")}.'\n", | |
"\n", | |
"\n", | |
"print(generateTheme())\n" | |
] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python 3", | |
"language": "python", | |
"name": "python3" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.11.0" | |
}, | |
"orig_nbformat": 4 | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 2 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment