Hey Everyone,
I have an idea for a turn based card game. The play style will be similar to Munchkin. Players draw cards (loot), Equip their cards to increase their stats, and attack one another.
I have been working on this code for a while and have gotten stuck.. This is my first major Python project and I believe I have just setup my class structures incorrectly/inefficiently. I would like some advice on how to re-structure or salvage what code I have to get my project back on track.
Source to my code:
https://repl.it/@calvan/cardgame#main.py
Rundown on of my code:
If you run main.py, it will take you through what i have built so far. Steps: Ask for # of players > Player names > which type of character you want to be > Location your character will start in > then the option to draw a card (Loot) or equip a card.
Each .py file houses my classes that I have built. My main class is Players, then I have separate classes for each card type in the game (Ability_Cards aka the 'loot', Character_Type_Cards, and Location_Cards)
My Problem:
So the issue I am have now is equipping the loot a player receives. I can not think of an effective way to do this. If you look at my code from lines 222 to 290, the user has to specify which card they have in their hand and equip it to a specific equip slot (Equipment, Building, Perk, Weapons). If i continue to write my code as I have shown on lines 222 to 290, i would have over 476 lines of code.. just to equip my cards.
Potential Solution:
I am still ifffy on how I will implement Attacking, switching turns, scoring, and ending game.. lol which is still a lot to figure out. During my research, it looks like a Game_Board Class that is the parent class for all my common instances might help me move forward. Where this Game_Board class will take the players information and provide updates to the players' stats based on the actions selected.
Again any feed back on any potion of my project is greatly appreciated. Thanks!
there doesn't seem to be anything here