Inspiration

At the beginning of hackathon someone threw a paper that had," Restore communism. At first I found this funny but eventually something clicked and I realized that I should make a game with communism in it.

What it does

One types in one of the two or three options that they have a choice in picking. This leads to another decision which one wouldn't have gotten by picking one of the other previous decisions. This leads to a branch like decision tree all stemming from one decision. The decisions aren't the only things choosing a different decision offers. There is a whole system on happiness of the people, how foreign relations are doing, and how unified your nation is. If one become too low in any category they lose.

How I built it

I built An Ideological Struggle using Python 3.6.3 IDLE. The majority of all structures in the code are If statements. So to make the decisions one just inserts another If statement under the section they want the code to be under. EX.

s = input('Do you like apples Y/N?: ') print (s) if s=="Y": print('You like apples.') if s=="N": print('You don\'t like apples.')

This structure composes most of the decisions with minor additions to prevent false entries.

Challenges

A big challenge I ran into was that my computer was updating for an hour and a half forcing me to code on my phone. The other was the function allowing the happiness, relations, and national unity variables to actually end the game with minimal code.

Accomplishments that I'm proud of

I'm proud of simply finished it because the only other code I have worked on in Python was only 9 lines. This code I am submitting is a big improvement on that.

What I learned

I learned a great deal on functions and a while loop to prevent spam or intentionally messed up words to mess up the code.

What's next for An Ideological Struggle

I have only worked on a small bit of one of the three ideologies. I plan to fully flush out all ideological decision trees all the way to 1945 and keep in mind I've stayed in the relatively short term in the current code

Built With

Share this project:

Updates