Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time
- import datetime
- import random
- import turtle
- print('''
- ****************************************
- * *
- * Welcome to Space Adventures! *
- * *
- ****************************************
- ''')
- print('Initialization...')
- time.sleep(1)
- ship = [
- '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',
- '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@$$$$$$$@@@@@@@@@',
- '@@@@@@@@@@@@@@@@@@@@@@@@@@@@$___-$$$$$$$@@@@@@@',
- '@@@@@@@@@@@@@@@@@@@@@@@@@@-______-$$$$$$$@@@@@@',
- '@@@@@@@@@@@@@@@@@@@@@@@@$__________-$$$$$@@@@@@',
- '@@@@@@@@@@@@@@@@@@@@@@@___-$$$$-_____--$$@@@@@@',
- '@@@@@@@@@@@@@@@@@@@@@$___-------$______-@@@@@@@',
- '@@@@@@@@@@@@@@@@@@@@_____-------$____-@@@@@@@@@',
- '@@@@@@@@@@@@@@$$$$-_______-$$$$$___-@@@@@@@@@@@',
- '@@@@@@@@@@@@$$$$$________________$@@@@@@@@@@@@@',
- '@@@@@@@@@@$$$$$-_____-$_______-@@@@@@@@@@@@@@@@',
- '@@@@@@@@@@@@@@@____$$-_____-@@@@@@@@@@@@@@@@@@@',
- '@@@@@@@@@@@@@@--_$$-_____-$@@@@@@@@@@@@@@@@@@@@',
- '@@@@@@@@@@@@$--$$-____-$$$$@@@@@@@@@@@@@@@@@@@@',
- '@@@@@@@@@@$$_--_-$@@@$$$$$@@@@@@@@@@@@@@@@@@@@@',
- '@@@@@@@@@$-__--$@@@@@$$$@@@@@@@@@@@@@@@@@@@@@@@',
- '@@@@@@@@$$-$$$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',
- '@@@@@@@$$$@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',
- '@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@',]
- for i in range(len(ship)):
- print(ship[i])
- time.sleep(.1)
- print('\nYeah! The spaceship is ready.')
- name = []
- print('\n****************************************')
- print('\tSPACESHIP ID-', end='')
- for i in range(5):
- r = random.randint(0,9)
- name.append(r)
- print(name[i], end='')
- print('\n\tDate: ', end='')
- print(datetime.date.today())
- print('****************************************')
- print('''
- Options:
- [1] - stars
- [2] - galaxy
- [3] - missile
- [4] - protection
- [5] - event
- [0] - exit
- ''')
- while True:
- print('****************************************')
- print('****************************************')
- select = input('Your select: ')
- if select == '1' or select == '2':
- turtle.TurtleScreen._RUNNING = True
- turtle.bgcolor('black')
- turtle.speed(0)
- turtle.pensize(1)
- if select == '1':
- print('Stars are giant, luminous spheres of plasma.')
- colors = ['white', 'yellow']
- max_index = len(colors) - 1
- for i in range(50):
- random_index = random.randint(0, max_index)
- new_color = colors[random_index]
- turtle.color(new_color)
- turtle.begin_fill()
- for i in range(5):
- turtle.forward(15)
- turtle.right(144)
- turtle.penup()
- turtle.end_fill()
- w = turtle.window_width() // 2 - 50
- h = turtle.window_height() // 2 - 50
- x = random.randrange(-w, w)
- y = random.randrange(-h, h)
- turtle.goto(x,y)
- turtle.pendown()
- turtle.exitonclick()
- else:
- print('Galaxies consist of stars, stellar remnants, dust, gas, and dark matter, bound together by gravity.')
- turtle.pencolor('purple')
- colors = ['white', 'yellow']
- max_index = len(colors) - 1
- for i in range(100):
- turtle.pensize(i/100 + 1)
- turtle.forward(i)
- turtle.left(59)
- turtle.exitonclick()
- elif select == '3':
- print('Launching a missile...')
- missile = [
- '##################################@$@@@',
- '###############################@$-@@@@#',
- '############################@@_$@@@@@##',
- '##########################@-_@@@@@@@###',
- '#######################@@_-@##@@@@@####',
- '#####################@@_-@@@--@@@@#####',
- '###################@@_-@@@@@@@@@#######',
- '##################@__@@@@@@@@@@########',
- '################@-_@@@@@@@@@@@#########',
- '##############@$_$@@@@@@@@@@###########',
- '#######@@$$$$@$-@@@@@@@@@@@############',
- '#####@$@@@@@@$@@$@@@@@@@@##############',
- '###@$@@@@@@@@@@@@@@@@@@################',
- '##@@@@@@@@@@@@@@@@@@@@#################',
- '#@@@##@@@@@@@@@@@@@@@@#################',
- '#######@@@@@@@@@@@@@@@#################',
- '######-#@@@@@@@@@@@@@##################',
- '####$$-@-####@@@@@@@###################',
- '##$$---$$#####@@@@#####################',
- '#$$--$$#######@@#######################',
- '$$$$$$#################################',
- '$$$####################################'
- ]
- for i in range(len(missile)):
- print(missile[i])
- time.sleep(.2)
- elif select == '4':
- print('An enemy spaceship is moving toward your SPACESHIP ID-', end='')
- for i in range(5):
- print(name[i], end='')
- print('\nStart protection...')
- time.sleep(1)
- protection = [
- '....................._-$@@@$-@_................',
- '...................-$$$$$@@@@$$_...............',
- '...................$$$$@@@@$$@$$_..............',
- '...................-$$$$@@@$$@$-...............',
- '..................._@#$$@##@$$-_...............',
- '..................._-$$$$$$$$$_................',
- '..................._$$@@@@@@$_.................',
- '...................._-@@@@@_...................',
- '...................._-@@#@@$_..................',
- '.................._@$$@@@@@@@$_................',
- '................._@$$$$@@@@##@@$...............',
- '................_-@@$$$@@@#@#@@@@_.............',
- '................_@@__$$@@@@@@_.$@@-............',
- '..............._@@$._@$@@#@@@_..$@@_...........',
- '.............._$@-._-@$@@@@@@..._@@-...........',
- '............._$@_.._$@$@@#@@@_..._@$_..........',
- '.............-@@$_._@@@@@@@@$_.._@@@$..........',
- '.............$$.__._@@@#_@#@$...$__@$..........',
- '............._$_..._@@#@_$$@$._...-$_..........',
- '..................._@@#@_$@@@-.................',
- '....................$@#@@-@@@$.................',
- '..................._$@#@@$@@@@_................',
- '..................._--___@@$$@$_...............'
- ]
- for i in range(len(protection)):
- print(protection[i])
- time.sleep(.2)
- elif select == '5':
- event = ['Входим в особую зону, где происходит рождение звезд!', 'Приближаемся к Галактике Андромеды!', 'Внимание! Летит астероид. ', 'Обнаружены космические пираты!']
- print(random.choice(event))
- print('Предпринять меры?\n[y] - Yes\n[n] - No')
- ct = input('Your choice: ')
- if ct == 'y':
- print('''
- ....................._-$@@@$-@_................
- ...................-$$$$$@@@@$$_...............
- ...................$$$$@@@@$$@$$_..............
- ...................-$$$$@@@$$@$-...............
- ..................._@#$$@##@$$-_...............
- ..................._-$$$$$$$$$_................
- ..................._$$@@@@@@$_.................
- ...................._-@@@@@_...................
- ...................._-@@#@@$_..................
- .................._@$$@@@@@@@$_................
- ................._@$$$$@@@@##@@$...............
- ................_-@@$$$@@@#@#@@@@_.............
- ................_@@__$$@@@@@@_.$@@-............
- ..............._@@$._@$@@#@@@_..$@@_...........
- .............._$@-._-@$@@@@@@..._@@-...........
- ............._$@_.._$@$@@#@@@_..._@$_..........
- .............-@@$_._@@@@@@@@$_.._@@@$..........
- ............._$_..._@@#@_$$@$._...-$_..........
- ..................._@@#@_$@@@-.................
- ....................$@#@@-@@@$.................
- ..................._$@#@@$@@@@_................
- ..................._--___@@$$@$_...............''')
- print('Вы спаслись!')
- continue
- if ct == 'n':
- print('Вы не спаслись... Game Over')
- break
- elif select == '0':
- break
- else:
- print('Error!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement