{"id":19920,"date":"2022-10-25T21:23:10","date_gmt":"2022-10-25T19:23:10","guid":{"rendered":"https:\/\/rayshell.de\/?page_id=19920"},"modified":"2023-10-25T02:59:51","modified_gmt":"2023-10-25T00:59:51","slug":"lesson-6","status":"publish","type":"page","link":"https:\/\/rayshell.de\/en\/lesson-6\/","title":{"rendered":"Lesson 6"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"19920\" class=\"elementor elementor-19920 elementor-22783\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-b4d5ebc elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"b4d5ebc\" data-element_type=\"section\" data-e-type=\"section\" data-settings=\"{&quot;background_background&quot;:&quot;classic&quot;}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-5195801\" data-id=\"5195801\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-7827267\" data-id=\"7827267\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-2c7164e elementor-widget elementor-widget-heading\" data-id=\"2c7164e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Lesson 6<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-078742b elementor-widget elementor-widget-text-editor\" data-id=\"078742b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p><strong>Welcome to your AOZ Studio Lesson 6 &#8211; Neil Ives<\/strong><br \/><strong>(This lesson enhance the Lesson 3)<\/strong><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f42fbb3 elementor-widget elementor-widget-text-editor\" data-id=\"f42fbb3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Remark from RayShell: Only all the text in the black code boxes in these lessons here is AOZ code, click in the upper right corner on copy to copy the code to the clipboard. Go to the AOZ Studio\u2122 Editor to and paste the code inside your program. The <mark class=\"has-inline-color has-vivid-green-cyan-color\"><\/mark> \/\/green text are comments you have to type or paste line by line into the editor window. The green Text after the \/\/ is only for your Information and to Understand the working and logic of your written AOZ Code. It is always a good idea and very important that you comment your code while you create it for your own Overview of the whole project, so you read your own Code very easy even Years later.<br \/>The most Important Thing for you is to feel free to play and try out the learned Basic Commands in own Test Projects. Change Values, Put your own Words and Ideas inside your program. If you make something wrong and push the Run Button the Run Command will stop and show where the Error is placed with a Line Number down in the Message Window. The other thing what can happen is that the Run Command starts your Application but you won&#8217;t see anything or you see not what you are expecting to see. Then you have to change your Code to be in the correct syntax and order to work with AOZ and to produce for you your desired Output.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8563d33 elementor-widget elementor-widget-text-editor\" data-id=\"8563d33\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In the editor, click the paper icon at the top left to create a new project. Select Others in the left menu and choose Customizable Project, delete the entry \u201cMy Application\u201d and give the new project the name Lesson 6.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0f42185 elementor-widget elementor-widget-image\" data-id=\"0f42185\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/new_custom_project.png\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"new_custom_project\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6Mjc2OTAsInVybCI6Imh0dHBzOlwvXC9yYXlzaGVsbC5kZVwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyM1wvMDVcL25ld19jdXN0b21fcHJvamVjdC5wbmcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img fetchpriority=\"high\" decoding=\"async\" width=\"640\" height=\"415\" src=\"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/new_custom_project.png\" class=\"attachment-large size-large wp-image-27690\" alt=\"\" srcset=\"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/new_custom_project.png 897w, https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/new_custom_project-300x195.png 300w, https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/new_custom_project-768x498.png 768w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cd68582 elementor-widget elementor-widget-text-editor\" data-id=\"cd68582\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>You will then find your program in the folder Documents\/My AOZ Applications\/Lesson 6 where you will also find the subfolder &#8216;resources&#8217; where images and sounds are stored.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-344f34e elementor-widget elementor-widget-text-editor\" data-id=\"344f34e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>After you created your new project, the folders for images and sounds were also created in your project folder. In order to use images or samples in your program, you must make them available in your project folder for AOZ Studio. For this lesson we will copy the images and samples from the AOZ Studio Tutorials directory and paste them into your Project Lesson_6. Open the C:\/AOZ Studio\/app\/AOZ Store\/ Tutorials\/1. Start\/Lessons to start with &#8211; ENGLISH\/AOZ Studio Lesson 6 directory via Windows Explorer and there the subfolder resources as shown in the picture and copy the folder samples.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-94aecde elementor-widget elementor-widget-image\" data-id=\"94aecde\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/rayshell.de\/wp-content\/uploads\/2022\/02\/Lessons-to-start-with-recources.jpg\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"Lessons-to-start-with-recources\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NzM2MywidXJsIjoiaHR0cHM6XC9cL3JheXNoZWxsLmRlXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIyXC8wMlwvTGVzc29ucy10by1zdGFydC13aXRoLXJlY291cmNlcy5qcGcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img decoding=\"async\" width=\"640\" height=\"384\" src=\"https:\/\/rayshell.de\/wp-content\/uploads\/2022\/02\/Lessons-to-start-with-recources-1024x614.jpg\" class=\"attachment-large size-large wp-image-7363\" alt=\"\" srcset=\"https:\/\/rayshell.de\/wp-content\/uploads\/2022\/02\/Lessons-to-start-with-recources-1024x614.jpg 1024w, https:\/\/rayshell.de\/wp-content\/uploads\/2022\/02\/Lessons-to-start-with-recources-300x180.jpg 300w, https:\/\/rayshell.de\/wp-content\/uploads\/2022\/02\/Lessons-to-start-with-recources-768x461.jpg 768w, https:\/\/rayshell.de\/wp-content\/uploads\/2022\/02\/Lessons-to-start-with-recources.jpg 1167w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">copy samples folder<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-eb5834b elementor-widget elementor-widget-text-editor\" data-id=\"eb5834b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Then go to your new Project folder in the Documents\/My AOZ Application folder and paste the copied Samples folder there.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3be6fe7 elementor-widget elementor-widget-image\" data-id=\"3be6fe7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/rayshell.de\/wp-content\/uploads\/2020\/11\/AOZ-Samples-einfuegen.jpg\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"AOZ Samples einf\u00fcgen\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MjMzOCwidXJsIjoiaHR0cHM6XC9cL3JheXNoZWxsLmRlXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIwXC8xMVwvQU9aLVNhbXBsZXMtZWluZnVlZ2VuLmpwZyJ9\">\n\t\t\t\t\t\t\t<img decoding=\"async\" width=\"640\" height=\"368\" src=\"https:\/\/rayshell.de\/wp-content\/uploads\/2020\/11\/AOZ-Samples-einfuegen.jpg\" class=\"attachment-large size-large wp-image-2338\" alt=\"\" srcset=\"https:\/\/rayshell.de\/wp-content\/uploads\/2020\/11\/AOZ-Samples-einfuegen.jpg 839w, https:\/\/rayshell.de\/wp-content\/uploads\/2020\/11\/AOZ-Samples-einfuegen-300x172.jpg 300w, https:\/\/rayshell.de\/wp-content\/uploads\/2020\/11\/AOZ-Samples-einfuegen-768x441.jpg 768w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">paste samples folder<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f922519 elementor-widget elementor-widget-text-editor\" data-id=\"f922519\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The images are stored in the images folder. Open the C:\/AOZ_Studio\/app\/AOZ Store\/ Tutorials\/1. Start\/Lessons to start with &#8211; ENGLISH\/AOZ Studio Lesson 6 folder with the Windows Explorer and there the subfolder resources as shown on the picture and open the folder images. There select all images and copy them.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fdf6a50 elementor-widget elementor-widget-image\" data-id=\"fdf6a50\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/rayshell.de\/wp-content\/uploads\/2022\/02\/Lessons-to-start-with-images.jpg\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"Lessons-to-start-with-images\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NzM2OCwidXJsIjoiaHR0cHM6XC9cL3JheXNoZWxsLmRlXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIyXC8wMlwvTGVzc29ucy10by1zdGFydC13aXRoLWltYWdlcy5qcGcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"396\" src=\"https:\/\/rayshell.de\/wp-content\/uploads\/2022\/02\/Lessons-to-start-with-images-1024x633.jpg\" class=\"attachment-large size-large wp-image-7368\" alt=\"\" srcset=\"https:\/\/rayshell.de\/wp-content\/uploads\/2022\/02\/Lessons-to-start-with-images-1024x633.jpg 1024w, https:\/\/rayshell.de\/wp-content\/uploads\/2022\/02\/Lessons-to-start-with-images-300x185.jpg 300w, https:\/\/rayshell.de\/wp-content\/uploads\/2022\/02\/Lessons-to-start-with-images-768x475.jpg 768w, https:\/\/rayshell.de\/wp-content\/uploads\/2022\/02\/Lessons-to-start-with-images.jpg 1137w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">copy all pictures<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f336a49 elementor-widget elementor-widget-text-editor\" data-id=\"f336a49\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Then go to your new project under Documents\/My AOZ Applications\/Lesson 6 \/resources and open the subfolder 1.images. Paste all copied images there now. Done !<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0969ddc elementor-widget elementor-widget-image\" data-id=\"0969ddc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t<figure class=\"wp-caption\">\n\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/rayshell.de\/wp-content\/uploads\/2020\/11\/AOZ-Images-einfuegen-1.jpg\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"AOZ Images einf\u00fcgen\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6MjM0MywidXJsIjoiaHR0cHM6XC9cL3JheXNoZWxsLmRlXC93cC1jb250ZW50XC91cGxvYWRzXC8yMDIwXC8xMVwvQU9aLUltYWdlcy1laW5mdWVnZW4tMS5qcGcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"243\" src=\"https:\/\/rayshell.de\/wp-content\/uploads\/2020\/11\/AOZ-Images-einfuegen-1-1024x388.jpg\" class=\"attachment-large size-large wp-image-2343\" alt=\"\" srcset=\"https:\/\/rayshell.de\/wp-content\/uploads\/2020\/11\/AOZ-Images-einfuegen-1-1024x388.jpg 1024w, https:\/\/rayshell.de\/wp-content\/uploads\/2020\/11\/AOZ-Images-einfuegen-1-300x114.jpg 300w, https:\/\/rayshell.de\/wp-content\/uploads\/2020\/11\/AOZ-Images-einfuegen-1-768x291.jpg 768w, https:\/\/rayshell.de\/wp-content\/uploads\/2020\/11\/AOZ-Images-einfuegen-1.jpg 1178w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t<figcaption class=\"widget-image-caption wp-caption-text\">paste all pictures to the empty 1.images folder<\/figcaption>\n\t\t\t\t\t\t\t\t\t\t<\/figure>\n\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9e45859 elementor-widget elementor-widget-text-editor\" data-id=\"9e45859\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>All preparations are done now and you can start programming your first game. Have fun with it ????<\/p><p>So we are ready, let&#8217;s start!<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-05d0361 elementor-widget elementor-widget-text-editor\" data-id=\"05d0361\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\/\/ <strong>This tutorial builds on what we learnt in other lessons<\/strong> \/\/<br \/>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9163d0e elementor-widget elementor-widget-text-editor\" data-id=\"9163d0e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Here we will discuss and use:<br \/>Recap on Procedures<br \/>Adding string segments together, (appending)<br \/>Sprites<br \/>Graphic Text<br \/>While\/Wend loops<br \/>Inkey$<br \/>Boolean variables<br \/>Recap on If\/Else\/Endif<br \/>Sound samples<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f3d7395 elementor-widget elementor-widget-text-editor\" data-id=\"f3d7395\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\/\/ <strong>Setting up the program<\/strong>\/\/<br \/>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a49d319 elementor-widget elementor-widget-code-highlight\" data-id=\"a49d319\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>#splashScreen:False     \/\/Try setting this to 'True' to see the effect\n#fullScreen:true\n#googleFont:\"acme\"    \/\/Select the graphic font to use. See note later\nCurs Off        \/\/Screen cursor is not needed<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0f9359f elementor-widget elementor-widget-text-editor\" data-id=\"0f9359f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\/\/ <strong>Setting up string segments<\/strong> \/\/<br \/>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0bae76f elementor-widget elementor-widget-code-highlight\" data-id=\"0bae76f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>ST9$=\"What should he move? \"\nST10$=\"(M)an \"\nST11$=\"(F)ox \"\nST12$=\"(C)hicken \"\nST13$=\"(S)ack of corn\"\nAll$=ST9$+ST10$+ST11$+ST12$+ST13$'Notice how strings can be added together, (appended).<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e67427e elementor-widget elementor-widget-text-editor\" data-id=\"e67427e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>When All$ is printed it will look like this: &#8220;What should he move? (M)an (F)ox (C)hicken (S)ack of corn&#8221;.<br \/>During the game various partial strings will be added together to show the different choices available to the player.<br \/>NOTE: Don&#8217;t forget to consider adding a space at the end of a string segment to format the completed string correctly<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6dc31a4 elementor-widget elementor-widget-text-editor\" data-id=\"6dc31a4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/<br data-rich-text-line-break=\"true\" \/>\/\/ <strong>Global<\/strong> \/\/<br data-rich-text-line-break=\"true\" \/>\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-588d7f8 elementor-widget elementor-widget-text-editor\" data-id=\"588d7f8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>As discussed before, the word &#8216;Global&#8217; allows these variables to be seen in all parts of the program.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-325abc6 elementor-widget elementor-widget-code-highlight\" data-id=\"325abc6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>Global All$,ST9$,ST10$,ST11$,ST12$,ST13$,STOPME<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3539cdb elementor-widget elementor-widget-text-editor\" data-id=\"3539cdb\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br data-rich-text-line-break=\"true\" \/>\/\/ <strong>Boolean Variable<\/strong> \/\/<br data-rich-text-line-break=\"true\" \/>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9097fff elementor-widget elementor-widget-text-editor\" data-id=\"9097fff\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>STOPME is being used as a boolean variable. Boolean values are like a light switch, they can only be in one of two states, eg., &#8216;True\/False&#8217;, or &#8216;0\/1&#8217;, or &#8216;On\/Off&#8217;<br \/>We have used the boolean method to halt the program.<br \/>Check out the note following STOPME in the main program loop.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4b96a9f elementor-widget elementor-widget-text-editor\" data-id=\"4b96a9f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\/\/ <strong>Graphic Text Fonts<\/strong> \/\/<br \/>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-55e1196 elementor-widget elementor-widget-text-editor\" data-id=\"55e1196\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Here we introduce Graphic Text Fonts:<br \/>In previous lessons we&#8217;ve been using the default text fonts to Print to the screen.<br \/>These are used again in this game to show messages at the top of the screen.<br \/>However, this time, for the introduction screen and the user feedback texts we have used the more visually interesting graphical Google Font called &#8220;Acme&#8221; <br \/>Graphical fonts can be positioned anywhere on screen by using graphical coordinates rather than text columns and lines, eg., Text 40,170<br \/>A Graphical font colour is set by &#8216;Ink&#8217;; eg., Ink 1<br \/>Set Font tells the program which font to use and what size, eg., Set Font &#8220;acme&#8221;,55<br \/>Strings can be used instead of actual quotes, eg., Text 40,170,ST9$ would work.<br \/>As the title message is only used at the start of the program we have used<br \/>actual text contained between quotation marks, eg.,Text 40,170,&#8221;A man must get himself and three things across a river&#8221;<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2aeb862 elementor-widget elementor-widget-code-highlight\" data-id=\"2aeb862\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>CLS 14   \/\/Clear screen to colour 11, (Green)\n\/\/Set font colour, name and size\nInk 1,14: Set Font \"acme\",55  \/\/Ink Textcolour,Backgroundcolour: choose a font and size <\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-282d4ce elementor-widget elementor-widget-text-editor\" data-id=\"282d4ce\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Notice how the text is positioned using graphical coordinates<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8d740ca elementor-widget elementor-widget-code-highlight\" data-id=\"8d740ca\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>Text 320,170,\"A man must get himself and three things across a river\"\nText 400,300,\"A Fox, a Chicken and a Sack of corn\" \nText 450,430,\"He can only take one thing at a time\"<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8dee7dc elementor-widget elementor-widget-text-editor\" data-id=\"8dee7dc\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Notice the change of font colour and size<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4501213 elementor-widget elementor-widget-code-highlight\" data-id=\"4501213\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>Ink 1:Set Font \"acme\",40     \/\/smaller\nText 750,550,\"Turn on the sound\"\nInk 0      \/\/Change font colour\nText 700,630,\"Press Any Key to continue\"<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-59e3308 elementor-widget elementor-widget-text-editor\" data-id=\"59e3308\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Change size<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6c4912e elementor-widget elementor-widget-code-highlight\" data-id=\"6c4912e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>Ink 0:Set Font \"acme\",20      \/\/smaller\nText 700,690,\"AOZ Studio - Lesson 6 - Neil Ives - Feb 2020\"\nWait Key     \/\/Obvious!<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c3d499a elementor-widget elementor-widget-text-editor\" data-id=\"c3d499a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br data-rich-text-line-break=\"true\" \/>\/\/ <strong>Set up the game screen<\/strong> \/\/<br data-rich-text-line-break=\"true\" \/>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ba95098 elementor-widget elementor-widget-code-highlight\" data-id=\"ba95098\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>CLS 14  \/\/Clear screen, (to green)\nInk 20:Bar 500,0 To 800,1080    \/\/Draw the river using colour blue and Bar x1,y1 to x2,y2\nInk 10: Bar 0,0 to 1920,90    \/\/Create a full width message area at the top of the screen\nLocate ,1:Paper 10:Pen 1:Centre All$   \/\/This is using simple text fonts.<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2b36565 elementor-widget elementor-widget-text-editor\" data-id=\"2b36565\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>See above how All$ was made up of short strings<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-34da0bf elementor-widget elementor-widget-text-editor\" data-id=\"34da0bf\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\/\/ <strong>Sprites<\/strong> \/\/<br \/>\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a17d6e3 elementor-widget elementor-widget-text-editor\" data-id=\"a17d6e3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Sprites are graphic objects that can be moved on screen and<br \/>have their image changed; for instance, in this game the fox,<br \/>the chicken and the boat show a reversed image on the other<br \/>side of the river.<br \/>Also, keep an eye out for other image changes!<\/p><p>Place the Sprites in the starting positions using graphical coordinates. The first Sprite is an image of a small boat<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a959c29 elementor-widget elementor-widget-code-highlight\" data-id=\"a959c29\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>Sprite 1,330,560,6 <\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d85afe5 elementor-widget elementor-widget-text-editor\" data-id=\"d85afe5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>The figures following the word Sprite, are: Sprite (number),(horizontal position),(vertical position),(image number). In this game the images are in .png format, numbered 1 to 16.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5684e06 elementor-widget elementor-widget-code-highlight\" data-id=\"5684e06\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>Sprite 2,0,365,10    \/\/Man \nSprite 3,400,490,5   \/\/Sack of corn \nSprite 4,170,430,4   \/\/Fox\nSprite 5,290,470,2   \/\/Chicken<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fd77f6e elementor-widget elementor-widget-text-editor\" data-id=\"fd77f6e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\/\/ <strong>The Game logic<\/strong> \/\/<br \/>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9b8556a elementor-widget elementor-widget-text-editor\" data-id=\"9b8556a\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In the previous version of this puzzle game we used the horizontal positions of<br \/>printed strings to decide if a bad move was made, or the player had won.<br \/>This program uses the horizontal positions of the Sprites to do the same thing.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c61cda5 elementor-widget elementor-widget-text-editor\" data-id=\"c61cda5\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br data-rich-text-line-break=\"true\" \/>\/\/ <strong>While Wend<\/strong> \/\/<br data-rich-text-line-break=\"true\" \/>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-55917fe elementor-widget elementor-widget-text-editor\" data-id=\"55917fe\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This program has a While\/Wend inside the main Do\/Loop<br \/>While Choice$=&#8221;&#8221;<br \/>Choice$=Inkey$<br \/>Wend<br \/>The loop above says: While Choice$=&#8221;&#8221; (=&#8221;&#8221; means an empty string), keep looping back at While End, (shortened to Wend)<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-df6a3fa elementor-widget elementor-widget-text-editor\" data-id=\"df6a3fa\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\/\/ <strong>Inkey$<\/strong> \/\/<br \/>\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4fb9bba elementor-widget elementor-widget-text-editor\" data-id=\"4fb9bba\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Inkey$ reads characters entered on keyboard<br \/>When Inkey$ gets a value from the keyboard it is passed to String variable Choice$, as Choice$ now has a value<br \/>the focus moves out of the While\/Wend loop.<\/p><p>Unlike &#8216;Input&#8217; the While\/Wend and Inkey$ combination does not require the &#8216;Enter&#8217; key to be pressed after making a choice so gives a more immediate response for the player of the game.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-29304c2 elementor-widget elementor-widget-text-editor\" data-id=\"29304c2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\/\/ <strong>Main Program loops<\/strong> \/\/<br \/>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-31270df elementor-widget elementor-widget-code-highlight\" data-id=\"31270df\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>Choice$=\"\"\nDo\nIf STOPME=TRUE then Goto MARK   \/\/This is neccessary to allow the program to be replayed    \nWhile Choice$=\"\"   \/\/This is an other form of loop, looking for a key pressed on the keyboard   \nChoice$=Inkey$   \nWend   \/\/send the value the user selected to the procedure PLACE_SPRITES \nPLACE_SPRITES[Choice$]\nChoice$=\"\"   \/\/Empty the string variable 'Choice$' ready for the next While\/Wend loop\nMARK:\nloop<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a7b2141 elementor-widget elementor-widget-text-editor\" data-id=\"a7b2141\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\/\/ <strong>Procedure recap<\/strong> \/\/<br \/>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-83d4888 elementor-widget elementor-widget-text-editor\" data-id=\"83d4888\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>In a previous lesson you saw how Procedures can be used as modular building blocks, each containing their own computer code.<br \/>In this game there are three procedures: PLACE_SPRITES, CHECK_IT and END_MESSAGES<br \/>Here is a description of each procedure:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d1fa468 elementor-widget elementor-widget-text-editor\" data-id=\"d1fa468\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\/\/ <strong>Procedure PLACE_SPRITES<\/strong> \/\/<br \/>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8f90412 elementor-widget elementor-widget-text-editor\" data-id=\"8f90412\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Takes the users input, (from Inkey$ in the main loops), converts it to upper case, because we cannot tell if the user has entered<br \/>capitals or lower case.<br \/>The procedure uses an &#8216;If\/Else\/End If&#8217; structure to first check if Sprite 2, (the one with the image of the man) is located on the left<br \/>side, (position 0). It then moves one of the items selected by the letters, &#8216;M&#8217;,&#8217;F&#8217;,&#8217;C&#8217;,&#8217;S&#8217; across the river.<br \/>If the man is not on the left he must be on the right side of the river so the &#8216;Else&#8217; statement captures the alternative position.<br \/>(The Sprite with the boat image always moves with the man.)<br \/>Text positions in each section are stored in TX so that feedback is shown to the player when they select a letter, &#8220;C, &#8220;F&#8221;, etc., they see Chicken&#8221;, &#8220;Fox&#8221; etc.<br \/>Before the feedback text is displayed that area of screen is cleared using a defined area of CLS using the background colour.<br \/>Finally, the procedure CHECK_IT is called.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a218e50 elementor-widget elementor-widget-text-editor\" data-id=\"a218e50\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\/\/ <strong>Procedure CHECK_IT<\/strong> \/\/<br \/>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-902d576 elementor-widget elementor-widget-text-editor\" data-id=\"902d576\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This proc does two things; it changes the selection texts at the top of the screen, (see earlier note about setting up text fragments)<br \/>This means the user only sees relevant selections. If Fox is not on the same side as the man, he cannot select it.<br \/>Next CHECK_IT looks for situations that mean the game has ended.<br \/>It may be that the player has got every item across the river and they have won the game, or it may mean that the fox has eaten the chicken etc.<br \/>At the end of that Proc, END_MESSAGES is sent a numeric value.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0f84441 elementor-widget elementor-widget-text-editor\" data-id=\"0f84441\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\/\/ <strong>Procedure END_MESSAGES<\/strong> \/\/<br \/>\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-44e8a68 elementor-widget elementor-widget-text-editor\" data-id=\"44e8a68\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>This proc deals with selecting and formatting one of six possible messages to be shown at the end of the game.<br \/>This proc has some added drama with samples and image changes<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5404556 elementor-widget elementor-widget-text-editor\" data-id=\"5404556\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/\/\/\/\/\/\/\/\/\/\/\/\/<br \/>\/\/ <strong>Sam Play<\/strong> \/\/<br \/>\/\/\/\/\/\/\/\/\/\/\/\/\/\/<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-239ac9b elementor-widget elementor-widget-text-editor\" data-id=\"239ac9b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Sam Play is used in Proc END_MESSAGES. Sam Play simply plays a sound sample.<br \/>The samples used in this game are .wav files, named &#8216;1.wav&#8217;, &#8216;2.wav&#8217; and &#8216;3.wav&#8217;<br \/>The sample folder is located in the application folder, &#8216;resources&#8217;<br \/>Check out the end messages to discover how samples and wait periods are used for dramatic effect.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-07ca01b elementor-widget elementor-widget-code-highlight\" data-id=\"07ca01b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>Procedure PLACE_SPRITES[C$] <\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8acca6f elementor-widget elementor-widget-text-editor\" data-id=\"8acca6f\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Place the Sprites at the predefined, dependant on the user input Only the allowed characters (M, F, C, S) will be acted upon<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4bbed42 elementor-widget elementor-widget-code-highlight\" data-id=\"4bbed42\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>C$ = Upper$(C$)'Input capitalised, as before \/\/Man at left positions\nIf X Sprite (2)=0   \/\/Sprite 2 is the man \nIf C$=\"M\"      \nSprite 1,770,560,7   \/\/Boat, (always moves with man) \nSprite 2,1110,365,10    \/\/Man   \nEnd if   \nIf C$=\"F\"  \nSprite 1,770,560,7    \/\/Boat \nSprite 2,1110,365,10   \/\/Man \nSprite 4,990,430,1        \/\/Fox  \nEnd If   \nIf C$=\"C\"    \nSprite 1,770,560,7   \/\/Boat      \nSprite 2,1110,365,10   \/\/Man \nSprite 5,900,470,3    \/\/Chicken   \nEnd If    \nIf C$=\"S\"     \nSprite 1,770,560,7   \/\/Boat   \nSprite 2,1110,365,10   \/\/Man    \nSprite 3,800,490,5    \/\/Sack of corn\nEnd If   \nTX=900  \/\/Feedback text position, (see later) \nElse   \/\/Man not at left side, hence using Else\nIf C$=\"M\"    \nSprite 1,330,560,6     \/\/Boat     \nSprite 2,0,365,10    \/\/Man  \nEnd if     \nIf C$=\"F\"      \nSprite 1,330,560,6     \/\/Boat    \nSprite 2,0,365,10   \/\/Man    \nSprite 4,170,430,4   \/\/Fox   \nEnd If   \nIf C$=\"C\"    \nSprite 1,330,560,6    \/\/Boat \nSprite 2,0,365,10    \/\/Man   \nSprite 5,290,470,2   \/\/Chicken \nEnd If    \nIf C$=\"S\"     \nSprite 1,330,560,6   \/\/Boat  \nSprite 2,0,365,10    \/\/Man \nSprite 3,400,490,5   \/\/Sack of corn   \nEnd If    \nTX=220    \/\/Feedback text position \nEnd If      \/\/Print Feedback text at positions defined by TX \nInk 10: Bar 0,0 to 1980,90  \/\/Clear text area\nInk 1:Set Font \"acme\",40 \nIf C$=\"C\" then Text TX,150,\"Chicken\"\nIf C$=\"F\" then Text TX,150,\"Fox\" \nIf C$=\"S\" then Text TX,150,\"Sack of Corn\" \nIf C$=\"M\" then Text TX,150,\"Man\" \nCHECK_IT   \/\/Go to the procedure that checks for bad decisions\nEnd proc\nProcedure CHECK_IT<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ac49d50 elementor-widget elementor-widget-text-editor\" data-id=\"ac49d50\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/&#8212;&#8212;&#8212;&#8212;- <strong>Update Top bar choices<\/strong> &#8212;&#8212;&#8212;&#8212;-<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-30bdf16 elementor-widget elementor-widget-code-highlight\" data-id=\"30bdf16\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>Ink 10: Bar 0,0 to 1300,90   \/\/ Clear previous message\n Locate 0,1:Paper 10:Pen 1  \/\/Set up printing colours<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7e5e1c6 elementor-widget elementor-widget-text-editor\" data-id=\"7e5e1c6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Use Sprite horizontal positions, derived from &#8216;X Sprite() to append strings to be used, ST10$+ST11$+ST12$+ST13$ etc. <br \/>This is all of the possible choices that do not trigger an &#8216;End of game&#8217; message.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3317e50 elementor-widget elementor-widget-code-highlight\" data-id=\"3317e50\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>\/\/All on left side \nIf X Sprite(2) = 0 and X Sprite(3) = 400 and X Sprite(4) = 170 and X Sprite(5) = 290  Then Centre ST10$+ST11$+ST12$+ST13$  \n\/\/Man, Fox, Corn on left side \nIf X Sprite(2) = 0 and X Sprite(3) = 400 and X Sprite(4) = 170  and X Sprite(5) = 900 then Centre ST10$+ST11$+ST13$   \n\/\/Man, Fox, Chicken on left side\nIf X Sprite(2) = 0 and X Sprite(3) = 800 and X Sprite(4) = 170 and X Sprite(5) = 290 then Centre ST10$+ST11$+ST12$   \n\/\/Man, Chicken, Corn on left side\nIf X Sprite(2) = 0 and X Sprite(3) = 400 and X Sprite(4) = 990 and X Sprite(5) = 290 then Centre ST10$+ST12$+ST13$   \n\/\/Man and Chicken on left side\nIf X Sprite(2) = 0 and X Sprite(3) = 800 and X Sprite(4) = 990 and X Sprite(5) = 290 Then  Centre ST10$+ST12$ \n\/\/Man, Fox, corn on right side \nIf X Sprite(2) = 1110 and X Sprite(3) = 800 and X Sprite(4) = 990 and X Sprite(5) = 290 then Centre ST10$+ST11$+ST13$  \n\/\/Man, Fox, chicken on right side\nIf X Sprite(2) = 1110 and X Sprite(3) = 400 and X Sprite(4) = 990 and X Sprite(5) = 900 then Centre ST10$+ST11$+ST12$ \n\/\/Man, Chicken, Corn on right side \nIf X Sprite(2) = 1110 and X Sprite(3) = 800 and X Sprite(4) = 170 and X Sprite(5) = 990 Then  Centre ST10$+ST12$+ST13$ \n\/\/Man and Chicken on right side\nIf X Sprite(2) = 1110 and X Sprite(3) = 400 and X Sprite(4) = 170 and X Sprite(5) = 900 Then Centre ST10$+ST12$<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9c48802 elementor-widget elementor-widget-text-editor\" data-id=\"9c48802\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>\/\/ Check for &#8216;End of Game&#8217; using the Sprite horizontal positions, derived from &#8216;X Sprite()&#8217; <br \/>Send a message number to Proc END_MESSAGES<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5ea6148 elementor-widget elementor-widget-code-highlight\" data-id=\"5ea6148\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"prismjs-tomorrow copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-javascript \">\n\t\t\t\t<code readonly=\"true\" class=\"language-javascript\">\n\t\t\t\t\t<xmp>\/\/Fox, Chicken and Corn are alone on left side\nIf X Sprite(4) = 170 and X Sprite(5) = 290 and X Sprite(3) = 400 and x Sprite(2) = 1110  Then END_MESSAGES[1] \n\/\/Fox and Chicken are alone on left side \nIf X Sprite(4) = 170 and X Sprite(5) = 290 and X Sprite(2) = 1110 then END_MESSAGES[2]\n\/\/Chicken and Corn are alone on left side \nIf X Sprite(5) = 290 and X Sprite(3) = 400 and X Sprite(2) = 1110 Then  END_MESSAGES[3]\n\/\/Fox and Chicken are alone on right side\nIf X Sprite(4) = 990 and X Sprite(5) = 900 and X Sprite(2) = 0 then END_MESSAGES[4] \n\/\/Chicken and Corn are alone on right side\nIf X Sprite(5)=900 and X Sprite(3) = 800 and X Sprite(2) = 0 Then: END_MESSAGES[5]\n \/\/Fox, Chicken, Corn and Man are all on right side\nIf X Sprite(4) = 990 and X Sprite(5) = 900 and X Sprite(3) = 800 and X Sprite(2)= 1110  Then END_MESSAGES[6]\nEnd Proc\nProcedure END_MESSAGES[MESSAGE]\n\/\/Show appropriate 'End Of Game' messages\nIf MESSAGE = 1  \nInk 10: Bar 0,0 to 1300,90   \nSam Play 2    \/\/Play sound sample of chicken  \nLocate ,1:Paper 10:Pen 1:Centre \"The Chicken ate the corn...\"  \nWait 0.5    \/\/Pause half second for dramatic effect!    \n\/\/Sprite Off 3 \/\/Remove corn [Sprite off does not work in this Beta  version of AOZ]   \nSprite 3,-100,490,5    \/\/Remove corn from visible screen  \nSprite 5,,,13   \/\/Image changed to fat chicken  \nWait 2    \/\/Pause for dramatic effect!     \n  \/\/Sprite Off 5\/\/Remove chicken[Sprite off does not work in this Beta version of AOZ]    \nSprite 5,-100,470,2  \/\/Remove chicken from visible screen   \nSprite 4,,,16  \/\/Image changed to Fat fox  \nWait 0.5  \/\/Pause again \nSam Play 3  \/\/Play sound sample of burp   \nBar 0,0 to 1300,90:Locate ,1:Centre \"...then the Fox ate the  Chicken!\":Wait 3\nEnd if\nIf MESSAGE = 2 Then Sam Play 3: Sprite 5,-100,470,2:Sprite 4,,,16:Ink 10: Bar 0,0 to 1300,90:Locate ,1:Paper 10:Pen 1:Centre \"The Fox ate the chicken!\":Wait 2 \nIf MESSAGE = 3 Then Sam Play 2: Sprite 3,-100,490,5:Sprite 5,,,13:Ink 10: Bar 0,0 to 1300,90:Locate ,1:Paper 10:Pen 1:Centre \"The Chicken ate the corn!\":Sam Play 2: Wait 2\nIf MESSAGE = 4 Then Sam Play 3: Sprite 5,-100,470,2:Sprite 4,,,15:Ink 10: Bar 0,0 to 1300,90:Locate ,1:Paper 10:Pen 1:Centre \"The Fox ate the chicken!\":Wait 2\nIf MESSAGE = 5 Then Sam Play 2: Sprite 3,-100,490,5:Sprite 5,,,14:Ink 10: Bar 0,0 to 1300,90:Locate ,1:Paper 10:Pen 1:Centre \"The Chicken ate the corn!\":Sam Play 2: Wait 2\nCLS 0\nIf MESSAGE = 6 then Sam Play 1:Ink 10: Bar 0,0 to 1920,90:Locate ,1:Paper 10:Pen 1:Centre \"Congratulations, you did it!\": Wait 1  \/\/Sample 1 is crowd cheering \nWait 0.5 \nLocate ,18:Paper 0:Pen 1: Centre \"Start the game new to go again\"\nWait 1 \nSTOPME=True   \/\/Logical flag used to halt program in main Do\/loop\nEnd proc<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2337906 elementor-widget elementor-widget-text-editor\" data-id=\"2337906\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>**Click on the &#8220;Run in Browser&#8221; button or F1 to start the program in the browser or on &#8220;Run in AOZ Viewer&#8221; (F2) to start it in the editor<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e53a834 elementor-widget elementor-widget-image\" data-id=\"e53a834\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/Game6_start.png\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"Game6_start\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6Mjc3NzksInVybCI6Imh0dHBzOlwvXC9yYXlzaGVsbC5kZVwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyM1wvMDVcL0dhbWU2X3N0YXJ0LnBuZyJ9\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"360\" src=\"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/Game6_start-1024x576.png\" class=\"attachment-large size-large wp-image-27779\" alt=\"\" srcset=\"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/Game6_start-1024x576.png 1024w, https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/Game6_start-300x169.png 300w, https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/Game6_start-768x432.png 768w, https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/Game6_start.png 1433w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-966383d elementor-widget elementor-widget-image\" data-id=\"966383d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/Game6_output.png\" data-elementor-open-lightbox=\"yes\" data-elementor-lightbox-title=\"Game6_output\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6Mjc3ODMsInVybCI6Imh0dHBzOlwvXC9yYXlzaGVsbC5kZVwvd3AtY29udGVudFwvdXBsb2Fkc1wvMjAyM1wvMDVcL0dhbWU2X291dHB1dC5wbmcifQ%3D%3D\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"358\" src=\"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/Game6_output-1024x573.png\" class=\"attachment-large size-large wp-image-27783\" alt=\"\" srcset=\"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/Game6_output-1024x573.png 1024w, https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/Game6_output-300x168.png 300w, https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/Game6_output-768x429.png 768w, https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/Game6_output-1536x859.png 1536w, https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/Game6_output.png 1615w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2a22fee elementor-widget elementor-widget-text-editor\" data-id=\"2a22fee\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Try to code own things with all the commands you learned here, change values and play with them.<br \/>A click on the ? in the upper right corner of the editor opens the integrated manual of AOZ Studio. There you will find more information, as well as a user manual in English and French and an overview of the commands of AOZ Studio in English. Here the commands are described with all possible options.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-95597d8 elementor-widget elementor-widget-text-editor\" data-id=\"95597d8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Thanks for programming with RayShell.de and tell your friends about it.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8759702 elementor-widget elementor-widget-text-editor\" data-id=\"8759702\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t<p>Updated 23.07.2023<br \/>Tested with AOZ Studio\u2122 version 1.0 Update 44 on 23.07.2023<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<div class=\"elementor-column elementor-col-33 elementor-top-column elementor-element elementor-element-b067dc2\" data-id=\"b067dc2\" data-element_type=\"column\" data-e-type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap\">\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Lesson 6 Welcome to your AOZ Studio Lesson 6 &#8211; Neil Ives(This lesson enhance the Lesson 3) Remark from RayShell: Only all the text in the black code boxes in these lessons here is AOZ code, click in the upper right corner on copy to copy the code to the clipboard. Go to the AOZ [&hellip;]<\/p>\n","protected":false},"author":153,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-19920","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Lesson 6 - RayShell Computer Department<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rayshell.de\/en\/lesson-6\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Lesson 6 - RayShell Computer Department\" \/>\n<meta property=\"og:description\" content=\"Lesson 6 Welcome to your AOZ Studio Lesson 6 &#8211; Neil Ives(This lesson enhance the Lesson 3) Remark from RayShell: Only all the text in the black code boxes in these lessons here is AOZ code, click in the upper right corner on copy to copy the code to the clipboard. Go to the AOZ [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rayshell.de\/en\/lesson-6\/\" \/>\n<meta property=\"og:site_name\" content=\"RayShell Computer Department\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-25T00:59:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/new_custom_project.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"10 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-6\\\/\",\"url\":\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-6\\\/\",\"name\":\"Lesson 6 - RayShell Computer Department\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rayshell.de\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-6\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-6\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rayshell.de\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/new_custom_project.png\",\"datePublished\":\"2022-10-25T19:23:10+00:00\",\"dateModified\":\"2023-10-25T00:59:51+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-6\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-6\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-6\\\/#primaryimage\",\"url\":\"https:\\\/\\\/rayshell.de\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/new_custom_project.png\",\"contentUrl\":\"https:\\\/\\\/rayshell.de\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/new_custom_project.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-6\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rayshell.de\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Lesson 6\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/rayshell.de\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/rayshell.de\\\/en\\\/\",\"name\":\"RayShell Computer Department\",\"description\":\"Programming made easy with AOZ Studio\u2122. Anyone over the age of 12 can start here for free.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/rayshell.de\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Lesson 6 - RayShell Computer Department","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rayshell.de\/en\/lesson-6\/","og_locale":"en_US","og_type":"article","og_title":"Lesson 6 - RayShell Computer Department","og_description":"Lesson 6 Welcome to your AOZ Studio Lesson 6 &#8211; Neil Ives(This lesson enhance the Lesson 3) Remark from RayShell: Only all the text in the black code boxes in these lessons here is AOZ code, click in the upper right corner on copy to copy the code to the clipboard. Go to the AOZ [&hellip;]","og_url":"https:\/\/rayshell.de\/en\/lesson-6\/","og_site_name":"RayShell Computer Department","article_modified_time":"2023-10-25T00:59:51+00:00","og_image":[{"url":"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/new_custom_project.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/rayshell.de\/en\/lesson-6\/","url":"https:\/\/rayshell.de\/en\/lesson-6\/","name":"Lesson 6 - RayShell Computer Department","isPartOf":{"@id":"https:\/\/rayshell.de\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rayshell.de\/en\/lesson-6\/#primaryimage"},"image":{"@id":"https:\/\/rayshell.de\/en\/lesson-6\/#primaryimage"},"thumbnailUrl":"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/new_custom_project.png","datePublished":"2022-10-25T19:23:10+00:00","dateModified":"2023-10-25T00:59:51+00:00","breadcrumb":{"@id":"https:\/\/rayshell.de\/en\/lesson-6\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rayshell.de\/en\/lesson-6\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rayshell.de\/en\/lesson-6\/#primaryimage","url":"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/new_custom_project.png","contentUrl":"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/new_custom_project.png"},{"@type":"BreadcrumbList","@id":"https:\/\/rayshell.de\/en\/lesson-6\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rayshell.de\/en\/"},{"@type":"ListItem","position":2,"name":"Lesson 6"}]},{"@type":"WebSite","@id":"https:\/\/rayshell.de\/en\/#website","url":"https:\/\/rayshell.de\/en\/","name":"RayShell Computer Department","description":"Programming made easy with AOZ Studio\u2122. Anyone over the age of 12 can start here for free.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rayshell.de\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/rayshell.de\/en\/wp-json\/wp\/v2\/pages\/19920","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rayshell.de\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/rayshell.de\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/rayshell.de\/en\/wp-json\/wp\/v2\/users\/153"}],"replies":[{"embeddable":true,"href":"https:\/\/rayshell.de\/en\/wp-json\/wp\/v2\/comments?post=19920"}],"version-history":[{"count":24,"href":"https:\/\/rayshell.de\/en\/wp-json\/wp\/v2\/pages\/19920\/revisions"}],"predecessor-version":[{"id":32013,"href":"https:\/\/rayshell.de\/en\/wp-json\/wp\/v2\/pages\/19920\/revisions\/32013"}],"wp:attachment":[{"href":"https:\/\/rayshell.de\/en\/wp-json\/wp\/v2\/media?parent=19920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}