{"id":1766,"date":"2021-07-27T23:07:43","date_gmt":"2021-07-27T23:07:43","guid":{"rendered":"https:\/\/computerscienced.co.uk\/site\/?page_id=1766"},"modified":"2023-10-03T21:57:12","modified_gmt":"2023-10-03T21:57:12","slug":"adventure-quest-game-programming-task","status":"publish","type":"page","link":"https:\/\/computerscienced.co.uk\/site\/adventure-quest-game-programming-task\/","title":{"rendered":"Adventure quest game programming task"},"content":{"rendered":"\n<p><strong>Create a program that does the following:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Uses the existing code below and expands on it to create an adventure game<\/li>\n\n\n\n<li>The user should have a choice (although limited) of where to go in the story <strong>EG<\/strong> left or right and what to do<\/li>\n\n\n\n<li>The adventurer should be able to complete at least 5 options (as a bare minimum) before completing the game<\/li>\n<\/ul>\n\n\n\n<p><strong>Remember<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The story can be about anything you like &#8211; you don&#8217;t have to use the story here.<\/li>\n\n\n\n<li>Think about interesting things that could happen along the way &#8211; there are some ideas below:<\/li>\n\n\n\n<li>Perhaps you could have to play a game with someone you meet along the way?<\/li>\n\n\n\n<li>Perhaps your character has health and interactions with certain characters can cause you to lose health<\/li>\n\n\n\n<li>Perhaps some things in your game are random &#8211; <strong>EG<\/strong> the amount of health taken from you if you lose a battle or the effects of drinking a potion  <\/li>\n<\/ul>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>def intro():\n   direction = input(&quot;You are at the start of a big scary forest. Do you want to turn left or right?&quot;)\n   if direction ==&quot;left&quot;:\n      left()\n   elif direction ==&quot;right&quot;:\n      right()\n   else:\n      print (&quot;That isn&#39;t a valid option&quot;)\n\ndef left():\n   print (&quot;You turn left and you see a monster that eats you.&quot;)\n   print (&quot;The End&quot;)\n\ndef right():\n   print (&quot;You turn right and see a house in the distance.&quot;)\n   #Continue the story and code here!\n\n\nintro()\n<\/code><\/pre><\/div>\n\n\n\n<p><strong>Challenge<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Allow the user to hold and use items in an inventory as they collect items in the game<\/li>\n\n\n\n<li>Allow the user to export their adventure to a text file<\/li>\n\n\n\n<li>Allow the user to save their game at any point and load the game where they left it<\/li>\n<\/ul>\n\n\n\n<p><strong>Success criteria<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The program is written using procedures or functions<\/li>\n\n\n\n<li>The program uses Python lists or arrays<\/li>\n\n\n\n<li>Use of suitable loops where necessary<\/li>\n\n\n\n<li>Contains suitable prompts for the user<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex wp-block-buttons-is-layout-flex\">\n<div class=\"wp-block-button has-custom-width wp-block-button__width-100 is-style-fill\"><a class=\"wp-block-button__link has-accent-background-color has-background wp-element-button\" href=\"https:\/\/computerscienced.co.uk\/site\/online-python-ide\/\"><strong>Click here to start this task in our online IDE<\/strong><\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Create a program that does the following: Remember Challenge Success criteria<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"inline_featured_image":false,"disable_featured_image":false,"footnotes":""},"class_list":["post-1766","page","type-page","status-publish","hentry"],"blog_post_layout_featured_media_urls":{"thumbnail":"","full":""},"categories_names":null,"comments_number":"0","_links":{"self":[{"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages\/1766","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/comments?post=1766"}],"version-history":[{"count":4,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages\/1766\/revisions"}],"predecessor-version":[{"id":6346,"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/pages\/1766\/revisions\/6346"}],"wp:attachment":[{"href":"https:\/\/computerscienced.co.uk\/site\/wp-json\/wp\/v2\/media?parent=1766"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}