Inspiration

Our initial plan was to create a productivity app using Android studio. However, we began facing multiple technical issues. Ironically, we couldn't make productive progress on the app and had to scrap the idea. We began brainstorming and remembered our love the famous card game, Cards Against Humanity. So we decided to create a virtualization of the game using the programming language, Python.

What it does

It is a virtualization of the popular card game "Cards Against Humanity". A minimum of 3 and a maximum of 6 players can participate. You may check the following link to learn how the game is played: link. Players are given a phrase or noun which they will use to answer a prompt based on a theme with a blank in it. Whichever player creates the funniest sentence by filling in the blank with their phrase card earns a point. Each player will take turns being the judge and determine which sentence they find the most funny. The program also allows users to create their own custom themes with their own prompts and answers.

How we built it

We used a combination of Objected Oriented and Procedural Programming to build our program.

Object Oriented programming was used to create a Theme() class that would store the theme name, the prompts and the answers (fillers) based on the number of players playing the game. A default theme with the theme name Family Friendly was hard-coded with preset prompts and answers. This theme would be used if no additional theme is created by the user. If a user wished to, they can create a new theme object with a name to add their own prompts and answers. These themes are then saved using the module pickle and can be used in future runs of the game.

Procedural Programming was used to implement the actual game. Once the user is asked to set the number of players and the theme, a player is made the prompt holder and the prompt is then displayed with a blank in it and the remaining players are handed out 5 cards each as a list containing 5 randomly generated answers from the theme to fill the blank (random module used). The player has to choose one of the answer to fill in the blank. Once every player has done this, the prompt holder awards a point to the player whose answer they deem the funniest.
This process is repeated until every player gets a chance to be a prompt holder. The final points are then tallied to determine the winner.

Challenges we ran into

Figuring out how to use pickle to save the theme objects into a list without overwriting the list posed a challenge. Also knowing where to load the themes in the python script was tricky.

Since the classes part and the main function of the program were worked on separately by team members, it was tricky to figure out how to integrate the two parts together into one python script.

Since we scrapped our initial idea for a productivity app after spending a considerable time, we had to work with a substantial time constraint on our new project, which combined with the fact that we worked all night tested our endurance.

Accomplishments that we're proud of

Being able to actually save user created themes to be used for future runs is a very rewarding feeling since it gives depth to our implementation of the game. Being able to execute a functional game on python that can genuinely be enjoyed by users playing it makes us feel that our project is meaningful. Completing it in the short time that we also helps us feel accomplished.

What we learned

Think about how we would implement a project before actually implementing it. With our Android studio project, we ran into technical issues such as syncing 'gradle' files and linking the project to github. We did not foresee these issues and couldn't resolve them despite the time we put into them. We strengthened our understanding of objected oriented programming and different ways of using objects for flexible functionality for required tasks.

What's next for Productive Procrastinators - Cards Against Humanity

While our program allows us to save themes in a list, it doesn't have the ability to delete themes from a the list if the user requires it. We have hard-coded the program to delete the list of themes, but this part of the code is commented out and has to be manually changed when required. Further improvement could be converting the file contents into a list and then deleting themes from that list if the user required it.

We would like to create a GUI (for example: by using pygame) to make the game more appealing.

Also, a fairly quicker way to create new themes would be make the program read from a text file which follows a particular format to add theme names, prompts and answers to an object of class Theme().

Due to time constraints, we couldn't implement these ideas and look forward to implementing them soon!

Built With

Share this project:

Updates