Skip to content
Menu
Daniel J. Pierce
  • C#
  • Games
  • Graphics
  • Math
  • Python
  • Tynker
  • Unity
Daniel J. Pierce

Protect the Galactic Empire

Posted on September 4, 2019November 11, 2019
def input():
    import builtins
    return builtins.input('in> ')
game = True
def main():
    print('''You're galactic empire is being attacked
You need to decide what to do
A: Get the army
B: Change the national anthem which is "You can't deafeat us" repeating and it puts everyone to sleep
C: Fight yourself
D: Surrender''')
    x = input()
    if x == 'A':
        choiceA()
        return None
    elif x == 'B':
        choiceB()
        return None
    elif x == 'C':
        choiceC()
        return None
    elif x == 'D':
        choiceD()
        return None
    else:
        print("You need to choose It is restarting...")
        main()
        return None
def choiceD():
    print('''You surrendered
They took over!
You lost!''')
    return None
def choiceC():
    print('''You are going to fight yourself
You have two choices
A: Use the national anthem
B: Fight to the death, you are not a good fighter''')
    x = input()
    if x == 'A':
        choiceCA()
        return None
    if x == 'B':
        choiceCB()
        return None
    else:
        print("You need to choose It is restarting...")
        choiceC()
        return None
def choiceCA():
    print('''You chose to use the national anthem and it worked, they are a sleep
and in prison
You Won!''')
    return None
def choiceCB():
    print('''You fought to the death and died
They took over
You lost!''')
    return None
def choiceB():
    print('''You took too long to change the nation anthem and they took over.
You lost!''')
    return None
def choiceA():
    print('''You chose to send the army, now what to say
A: They may die
B: They are serving their empire''')
    x =input()
    if x == 'A':
        choiceAA()
        return None
    elif x == 'B':
        choiceAB()
        return None
    else:
        print("You need to chose, restarting...")
        choiceA()
        return None
def choiceAA():
    print('''You told them, they may die, they ran away
Now you need to fight yourself''')
    choiceC()
def choiceAB():
    print('''You told them they are serving their empire, they defeated the invader
You Won!''')
    return None
title = 'Protect the Galactic Empire'
about = "You have to save the galactic empire with some choices"

if __name__ == '__main__':
    main()

Projects

  • Procedure Platforming
  • Particle Simulator
  • AP Computer Science Paint Program
  • Maybe Good Platformer
  • Custom Gravity Test
  • Triangle Types
  • Unity Obstacle Course v1
  • Collapsing rows
  • Java Tic Tac Toe (No AI)
  • Mersenne Prime Tester
  • Rainbow
  • Pong
  • Simple Tkinter Calculator
  • Hexidecimal Converter
  • Snake eats apple
  • Protect the Galactic Empire
  • Hangman
  • Beautiful Colorful Thing
  • Four Dots
  • Frogga
  • Escape asteroids
  • Portals
  • Guess the Number 2.0
  • Illogical
  • Tic Tac Toe
  • Guess the Number
  • Ultimate Calculator 1.0.0a0
  • Prime Number Tester
  • Number Base Converter 2.0a0
  • Number Base Converter 1.1
  • Python Equation Calculator
©2025 Daniel J. Pierce | WordPress Theme by Superb WordPress Themes