Skip to content

joshfokis/deck-building

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

deck-building

This repository contains a collection of files that together make up an in-progress attempt to design a text-based version of Cryptozoic's DC Deck-Building Game, using an object-oriented framework written in Python. The three files I've included are:

  1. objectclasses.py: This file contains all of the Object Class definitions for each component of the game, from the Game object, created each time a user wants to start a new game, to the Card object, of which hundreds of instantiations might be created within a single gameplay. This is the longest file in terms of code, and contains basically all of the game's behind-the-scenes happenings. Ideally, by the time the project is done, the parent file (currently play.py) will consist of just a few clean lines of code, and the gameplay will unfold from each new instantiation of the Game object.

  2. cards.py: Each of the cards I define here is an instantiation of the Card object defined in the objectclasses.py above. I put these definitions in a separate file just for convenience/organization's sake; that way, if I want to add or remove certain cards from the total stash that can be drawn on (while writing code specific to certain card types, for example) I can edit this file and leave everything else as it is. Also, the other files are a lot cleaner-looking without the big list of card names sitting at the top!

  3. play.py: Here's where the actual gameplay lies. As of now, it sets up a new Game object based on five pre-determined Player objects and their corresponding Heroes. Eventually, I'd like this to be input by the player, so that a user could conceivably enter the names and hero choices of their party, so to speak, and have the game be created dynamically based on these inputs. That part's still to come. What IS player input is everything that follows after: what cards to play from your hand and in what order, what cards to buy from the lineup or static stacks, etc. I haven't designed the Supervillain element of the game yet, so as of right now, player turns will keep cycling until the main deck runs out of cards.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%