From 403ee2c02cf54193e42a8f54f613d870e0f4de38 Mon Sep 17 00:00:00 2001 From: giggzze Date: Sun, 11 Oct 2020 10:44:08 +0100 Subject: [PATCH] restored --- StoryD7.py | 190 ++++++++++--------------------- __pycache__/story.cpython-38.pyc | Bin 6301 -> 5470 bytes 2 files changed, 63 insertions(+), 127 deletions(-) diff --git a/StoryD7.py b/StoryD7.py index 799e02a..53b1d42 100644 --- a/StoryD7.py +++ b/StoryD7.py @@ -1,12 +1,20 @@ - +import story +import os +import msvcrt as m import time +# clear the screen +def clear(): + print('\nPress enter to continue') + m.getch() + os.system('cls') + def slower_text(story): for i in story: time.sleep(1) print('\n%s' % i) -def dansStory(): +def mainStory(): listOfYes =["Yes", "yes", "Yes please", "yes please", "Yeah", "yeah","y"] playerName = input("\nHello, what is your name? ") Ans1 = input("\nWelcome " + playerName + " would you like to take take part in our story? ") @@ -61,28 +69,7 @@ def dansStory(): "At that moment he could see his brothers struggling but he felt helpless... He had a difficult choice to make."]) Ans6 = input("\nAre you going to 'risk your life to save your brother', or 'stay where you are and keep holding onto safety'") print("\nAfter the decision...") -dansStory() - -# gigs starts - -import story -import os -import msvcrt as m -# the logic for the sotry... - -# help function to display more informating about links in the story - -# get user input - -# clear the screen -def clear(): - print('\nPress enter to continue') - m.getch() - os.system('cls') - - -# main -def main(): +#Giggs slower_text(story.chairStory) print(story.context) selectContect = (input('Please select A,B,C,D...')) @@ -94,48 +81,46 @@ def main(): slower_text(story.sept) else: pass - clear() - print(story.decision) - a = int(input('Please select 1 or 2...')) - if a == 1: - print(story.leave) - elif a == 2: - print(story.back) + isNumber = False + while isNumber == False: + try: + clear() + print(story.decision) + a = int(input('Please select 1 or 2...')) + if a == 1: + print(story.leave) + elif a == 2: + print(story.back) + isNumber = True + except ValueError: + pass print(story.decision2) slower_text(story.con) -main() - # joel -next=False -while next==False: + next=False + while next==False: #ensures the correct option leads to the next section - slower_text(['After he uses the time machine for the second time,he arrives in New York in the 21st century.', 'He saw so many things different, at the start he was excited because it was everything new and they have so many things to learn.', 'In the 21st century, the technology is massive they have self-driving cars, pervasive smartphones, hoverboards, household robots that clean, cook', 'and practically can do everything and he wants to learn how things do what they do.', 'He was a little bit lost at the beginning, but he was willing to learn everything, so he starts working at a bar to learn their language and their costumes.', 'One year later he starts to learn more about the technology around him and he starts to understand how machines do what they do.', 'He reaches a point when he is working at a big technology company in New York, he bought a new house a good car but he was not satisfied.', 'It felt like something was missing but he doesn’t know why... Maybe he already learnd everything he wanted at the 21st century.','When Ricardo realized that a time travel with the time machine requires a real variety of resources he noticed that the several travells he made had already drained its batteries and it needs recharging,', 'but plutonium (the main source of energy) is not so easy to find in the present period. After some thinking Ricardo came up with two ideas for completing his plan to travel in time and space.', 'While the [1]first idea he had was great and would probably worked well he chose the [2]second idea.','He starts to create his technology and try to improve the time machine so he can go wherever he wants and the time he wants. [3]twenty years have passed...']) + slower_text(['After he uses the time machine for the second time,he arrives in New York in the 21st century. He saw so many things different, at the start he was excited because it was everything new and they have so many things to learn. In the 21st century, the technology is massive they have self-driving cars, pervasive smartphones, hoverboards, household robots that clean, cook and practically can do everything and he wants to learn how things do what they do. He was a little bit lost at the beginning, but he was willing to learn everything, so he starts working at a bar to learn their language and their costumes. One year later he starts to learn more about the technology around him and he starts to understand how machines do what they do. He reaches a point when he is working at a big technology company in New York, he bought a new house a good car but he was not satisfied. It felt like something was missing but he doesn’t know why... Maybe he already learnd everything he wanted at the 21st century.\n\nWhen Ricardo realized that a time travel with the time machine requires a real variety of resources he noticed that the several travells he made had already drained its batteries and it needs recharging, but plutonium (the main source of energy) is not so easy to find in the present period. After some thinking Ricardo came up with two ideas for completing his plan to travel in time and space. While the [1]first idea he had was great and would probably worked well he chose the [2]second idea.\n\nHe starts to create his technology and try to improve the time machine so he can go wherever he wants and the time he wants. [3]twenty years have passed...']) #main paragraph - choice=int(input("\nEnter choice by typing the number in square brackets")) + choice=int(input("\nEnter choice by typing the number in square brackets")) #allows user to input choices - if choice==1: - print("""\nHe can become a famous scientist and gain the trust of researchers to get plutonium. + if choice==1: + print("""\nHe can become a famous scientist and gain the trust of researchers to get plutonium. -Returning to previous page-""") - elif choice==2: - print("""\nHe can continue to develop the project and modify the time machine and further steal the plutonium. + elif choice==2: + print("""\nHe can continue to develop the project and modify the time machine and further steal the plutonium. -Returning to previous page-""") - elif choice==3: - next=True - slower_text(['He still hasn’t found a way to fix the machine, he travels to Tokyo to meet a friend who can try to help him, when he arrives in Tokyo he saw that technology was superior to new York and he thought“how will Tokyo be in 2090?”.','Five years later he finds a way to fix the time machine and he started preparing to travel to Tokyo 2090.','Ricardo landed in Tokyo, 2090. From being a technological powerhouse at the start of the 21st century, Tokyo is now the largest and most dominant capital globally, thanks to their investment in the science area.', 'Everything is very accessible and developed, both economically and infrastructurally. From the road markings to the gigantic billboards present in every uber, the streets are full of LEDs everywhere,', 'even more than before! Some people dislike it and say it\'s ugly and visual pollution,', 'while others love it and find it fascinating.','He decided to take in the views of the city whilst he was there']) - else: - print("\nPlease ensure the exact word is used(including case)") - #makes sure choice is valid - - - - #mateuszs code - # Put story into here + elif choice==3: + next=True + slower_text(['He still hasn’t found a way to fix the machine, he travels to Tokyo to meet a friend who can try to help him, when he arrives in Tokyo he saw that technology was superior to new York and he thought “how will Tokyo be in 2090?”.\n\nFive years later he finds a way to fix the time machine and he started preparing to travel to Tokyo 2090.\n\nRicardo landed in Tokyo, 2090. From being a technological powerhouse at the start of the 21st century, Tokyo is now the largest and most dominant capital globally, thanks to their investment in the science area. Everything is very accessible and developed, both economically and infrastructurally. From the road markings to the gigantic billboards present in every uber, the streets are full of LEDs everywhere, even more than before! Some people dislike it and say it\'s ugly and visual pollution, while others love it and find it fascinating.\n\nHe decided to take in the views of the city whilst he was there']) + else: + print("\nPlease ensure the exact word is used(including case)") + #makes sure choice is valid #Mateusz code -def views(): places = ['palace[1]','science museum[2]','art museum[3]','temple[4]','park[5]'] while len(places) != 0: print('\nThere are so many sights and scenery in Tokyo so theres so much to see and do.') @@ -143,98 +128,49 @@ def views(): print('\n%s' % places) go_to = input('\ngo to: ') if go_to == '1': - slower_text(['The Imperial Palace was his best bet to see what had changed.', 'Crossing the Seimon Ishibashi bridge, he found the Emperor of Japan welcoming guests into his hall.', 'There must’ve been a party; why not go and relax after all the hard work?']) + slower_text(['The Imperial Palace was his best bet to see what had changed. Crossing the Seimon Ishibashi bridge, he found the Emperor of Japan welcoming guests into his hall. There must’ve been a party; why not go and relax after all the hard work?']) proceed = input('\ngo and relax at the party[1], Go see more sights[2] ') print(proceed) if proceed == '1' and 'palace[1]' in places : - slower_text(['Ricardo went inside and saw the beautiful golden interior.', 'It must’ve been redesigned – robots raced across the floors to deliver food to esteemed guests, dragons would fly across the room and refill glasses and cup.', 'It was fascinating.']) + slower_text(['Ricardo went inside and saw the beautiful golden interior. It must’ve been redesigned – robots raced across the floors to deliver food to esteemed guests, dragons would fly across the room and refill glasses and cup. It was fascinating.']) places.remove('palace[1]') elif go_to == '2' and 'science museum[2]' in places: - slower_text(['He decided to visit the National Museum of Nature and Science and compare his notes to the historian’s views on the ancient world.', 'There were hundreds of artifacts and trinkets and so far, the historians and had got most of it bang on.']) - places.remove('science museum[2]') + slower_text(['He decided to visit the National Museum of Nature and Science and compare his notes to the historian’s views on the ancient world. There were hundreds of artifacts and trinkets and so far, the historians and had got most of it bang on.']) + places.remove(['science museum[2]']) elif go_to == '3' and 'art museum[3]' in places: - slower_text(['The National Museum of Western Art was going to be very weird and wonderful.', 'Comparing 1950s New York to the items on display in this museum would be fun to see.', 'Over 100 years worth of knowledge was stored in these display cabinets. He saw the newspaper he had read the day he first used the time machine.', 'He was impressed by the way Japan had developed so fast; collecting all these old items whilst simultaneously expanding on their technological front.']) + slower_text(['The National Museum of Western Art was going to be very weird and wonderful. Comparing 1950s New York to the items on display in this museum would be fun to see. Over 100 years worth of knowledge was stored in these display cabinets. He saw the newspaper he had read the day he first used the time machine. He was impressed by the way Japan had developed so fast; collecting all these old items whilst simultaneously expanding on their technological front.']) places.remove('art museum[3]') elif go_to == '4' and 'temple[4]' in places: - slower_text(['Sensō-ji Temple was a masterpiece and also Tokyo’s most famous shrine.', 'The Asakusa district was famous for its various festivals such as the Sanja Matsuri.']) + slower_text(['Sensō-ji Temple was a masterpiece and also Tokyo’s most famous shrine. The Asakusa district was famous for its various festivals such as the Sanja Matsuri.']) proceed = input('\ngo to the festival[1], go see more sights[2]: ') if proceed == '1': print('\nThe festival was beautiful: lights shining everywhere, traditional dancing and music from as far as the eye could see.') places.remove('temple[4]') elif go_to == '5' and 'park[5]' in places: - slower_text(['He travelled to Ueno Park and zoo.', 'The greenery was astoundingly serene, covering the whole park.', 'The zoo was filled with animals from all around the globe including polar bears, African elephants and camels.']) + slower_text(['He travelled to Ueno Park and zoo. The greenery was astoundingly serene, covering the whole park. The zoo was filled with animals from all around the globe including polar bears, African elephants and camels.']) places.remove('park[5]') -views() - - ###----ENDING----joel### -next=False -while next==False: + next=False + while next==False: - slower_text(['Japan had changed so much since the start of the 21st century.','Japan is now fully autonomous. There is no need to work anymore.', 'Doctors have been replaced by medical robots present in your own home, programmers were replaced by computers that feed themselves lines of code.', 'Every essential worker has been replaced by robots.','Ricardo is shocked. He could have never seen such a significant development since he was still in the 17th century when he decided to go on this adventure.', 'Also, do you remember Robocop? That\'s a real thing in 2090, although people don\'t trust the security of these armed droids, and don\'t trust the people behind the making of it.', 'It is a strange feeling; Ricardo stands here in the distant future where things he can only dream about exist. Now he could choose to', '[1]stay here in this amazing new world.', 'or', '[2]return to his original time in order to be with his family.', 'Maybe Ricardo could even do [3]both, stay in the future for a while then return afterwards']) + slower_text(['Japan had changed so much since the start of the 21st century.\nJapan is now fully autonomous. There is no need to work anymore. Doctors have been replaced by medical robots present in your own home, programmers were replaced by computers that feed themselves lines of code. Every essential worker has been replaced by robots.\nRicardo is shocked. He could have never seen such a significant development since he was still in the 17th century when he decided to go on this adventure. Also, do you remember Robocop? That\'s a real thing in 2090, although people don\'t trust the security of these armed droids, and don\'t trust the people behind the making of it. It is a strange feeling; Ricardo stands here in the distant future where things he can only dream about exist. Now he could choose to [1]stay here in this amazing new world or [2]return to his original time in order to be with his family. Maybe Ricardo could even do [3]both, stay in the future for a while then return afterwards']) - choice=int(input("\nEnter choice by typing the number in square brackets (each chioce shall lead to a diferent ending)")) + choice=int(input("\nEnter choice by typing the number in square brackets (each chioce shall lead to a diferent ending)")) - if choice== 1: - next=True - slower_text(['After thinking long and hard about the decision Ricardo decided to start a brand new life in Japan.','He had manged to get a simple job of doing maintenance on robots.', 'It was surprisingly easy for him to get the job as the only thing he had to do was ask each robot a series of questions.', 'Now he is living a good life with new technology and money, the only thing missing is that there is nothing to fill the void in his heart where his family would be.']) + if choice== 1: + next=True + slower_text(["After thinking long and hard about the decision Ricardo decided to start a brand new life in Japan. He had manged to get a simple job of doing maintenance on robots. It was surprisingly easy for him to get the job as the only thing he had to do was ask each robot a series of questions. Now he is living a good life with new technology and money, the only thing missing is that there is nothing to fill the void in his heart where his family would be."]) - elif choice== 2: - next=True - slower_text(['Without hesitation Ricardo returns home, to his amazement it seems no time has passed since his departure.', 'Thanks to this he does not need to explain what happened if it had even happened at all.']) + elif choice== 2: + next=True + slower_text(["Without hesitation Ricardo returns home, to his amazement it seems no time has passed since his departure. Thanks to this he does not need to explain what happened if it had even happened at all."]) - elif choice== 3: - next=True - print("\nHe decided to first gain some money and knowledge in Japan. This not only allows Ricardo to be able to use this back in the present it will also make him the smartest in his time period. Finally, after several months, he decides to go back to his home and check how things were over there. When he got to his island, everything was the same, except his family wasn't there.") + elif choice== 3: + next=True + slower_text(["He decided to first gain some money and knowledge in Japan. This not only allows Ricardo to be able to use this back in the present it will also make him the smartest in his time period. Finally, after several months, he decides to go back to his home and check how things were over there. When he got to his island, everything was the same, except his family wasn't there."]) - else: - print("\nPlease ensure that a valid number is entered exact word is used(including case)") -print("""\nThank you for playing -___THE END___""") - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + else: + print("\nPlease ensure that a valid number is entered exact word is used(including case)") + print("""\nThank you for playing + ___THE END___""") +mainStory() \ No newline at end of file diff --git a/__pycache__/story.cpython-38.pyc b/__pycache__/story.cpython-38.pyc index 7bff86dfeccbc10cd8336366e405dd197a697e7f..f6332f378f3d8e8e59a3dd9d3f06741dd9210cbb 100644 GIT binary patch delta 789 zcmZ`#OH31C5bnh(Hlo^o{W;{$%}~>y%|qNV@y#01)^S@$;{-NeBWed9`wEMS;+S1EflEgT_(B$AWcj{@qHf#59 z>9Zt8`LjN%*HU)lyfZ~2!;hUA5|iw7P1>mBk|@TnTrmB6IhB)ULvNss^%5l^D$U9A9m{s4f&CK~EGtKvXa@Se@<&!I9x#X7z zwDP9El|-Ju`ST>^8G(5c;I{#gC~=~$WMBNePF|ejSiLM|=K3;;5%vd1Y{A8#6h!!S zFe2Zu@gtZgMet%%2Z;`TXqPCzX^Q%Vd#qA5E-V+~qQG6v1rl?7w|P#lE!aP32rZDX z_-4o=QQ@sn#eVm-aH3sA#)`&DxwvGkEEld87Z*#*YF)>RhRPWnoOi@ xJIQRv|D8ysk6Nc>{M3Bgye-Z1hyPc73GIx32UHC<7{0*tMywLyv delta 1652 zcmZvdTWi!n6vvazY&OYu>o)7XAn6J%y==FYZLPYkt)R4)UTm$^$YRIL>}IgJm`SV! zp+5RjQ1j%2kAnK9eepr?3)Bywh=_vtB?QwKDb1OXVdlqw&YUynO!B?&4;zoL^MT`F*8ImC4x*uvSyaZrc82Xjwq%=R8u9| zve2849xH;N83!7-0!m#2`##0NvoH0Ilp;PRE&$XPX94;_G)kJ5w((WG3aGm?vpOK= znN>i%n^^(qX=w?d8`5=vewG#iT1ImKy^m%9`VlSZMmoAu_68unmz@IWyX+!lLXwvu zd{dr>@M~E8SME|Oc8XnqBTqrPQ|#?e z`7zD7aXG-iw(*}L25irE+$yK6q(Jn(t8=nSAgb?EzBEuB#R@3u2t+7>&} W-tR(BI@E