{"id":19801,"date":"2022-10-25T02:37:18","date_gmt":"2022-10-25T00:37:18","guid":{"rendered":"https:\/\/rayshell.de\/?page_id=19801"},"modified":"2023-10-25T02:57:59","modified_gmt":"2023-10-25T00:57:59","slug":"lesson-3","status":"publish","type":"page","link":"https:\/\/rayshell.de\/en\/lesson-3\/","title":{"rendered":"Lesson 3"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"19801\" class=\"elementor elementor-19801 elementor-22739\" data-elementor-post-type=\"page\">\n\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-330515b elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"330515b\" 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-f006278\" data-id=\"f006278\" 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-a0069a9\" data-id=\"a0069a9\" 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-6e1644d elementor-widget elementor-widget-heading\" data-id=\"6e1644d\" 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 3<br><br><\/h2>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a73caea elementor-widget elementor-widget-text-editor\" data-id=\"a73caea\" 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 3 &#8211; Written by Neil John Ives<\/strong><\/p><p><strong>This lesson will later be enhanced with Lesson 6<\/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-8b43e7b elementor-widget elementor-widget-text-editor\" data-id=\"8b43e7b\" 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 &#8220;My Application&#8221; and give the new project the name Lesson 3.<\/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-941a067 elementor-widget elementor-widget-image\" data-id=\"941a067\" 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-577f228 elementor-widget elementor-widget-text-editor\" data-id=\"577f228\" 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 tutorial will discuss and use many new functions and concepts:<\/p><p>Print, Locate, Paper, Pen, Centre,<br \/>Global, Input, Do Loop,<br \/>Procedures, Integer and String Variables,<br \/>If Then, If End If,<br \/>Upper$, Cls, Ink, Bar,<br \/>Wait n, Wait Key,<\/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-11573ac elementor-widget elementor-widget-text-editor\" data-id=\"11573ac\" 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>We are going to discover all of that by building a game.<br \/>The game goal is to cross a river in a very small boat with a chicken, a fox and some corn, without anyone be eaten!<\/p><p>Note: In a follow-up tutorial we will see how to improve this puzzle game.<br \/>We will add graphical texts, images and sound samples.<\/p><p>So 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-f99fea4 elementor-widget elementor-widget-text-editor\" data-id=\"f99fea4\" 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><em>Print, Locate and Pen &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/em><\/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-b8c7480 elementor-widget elementor-widget-text-editor\" data-id=\"b8c7480\" 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 already know these instructions if you have followed the Tutorial Lesson 1<br \/>Locate is used to position text using the &#8220;Print&#8221; instruction.<br \/>Eg., Locate 1,12 This means, One text column across from the left, and twelve rows down from the top Pen sets the text colour.<\/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-bd0aa7d elementor-widget elementor-widget-text-editor\" data-id=\"bd0aa7d\" 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>Paper set the background colour for text<br \/>Eg., Locate 1,12: Paper 11: Pen 1: Print &#8220;Hello&#8221;<br \/>Would show a white Hello text against a green background at the selected location 1, 12<\/p><p>Centre tells the program to print in the middle of the screen at the set location<br \/>Eg., Locate 0,10: Centre &#8220;Hello World&#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-531e2aa elementor-widget elementor-widget-text-editor\" data-id=\"531e2aa\" 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><em>Variables, (Integer and String)&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/em><\/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-2df82d4 elementor-widget elementor-widget-text-editor\" data-id=\"2df82d4\" 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 already know these a bit as well if you have followed the Tutorial Lesson 1<br \/>Variables are used to store a value that can vary, hence the name variable.<br \/>In this program some variables are used to store numbers that will let the program know where to place text on the screen.<\/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-4004305 elementor-widget elementor-widget-text-editor\" data-id=\"4004305\" 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>These variables are storing whole numbers which are known as Integers, so these are called Integer Variables<br \/>The following Integer Variables are used in this program:<br \/>mx, stores the horizontal position to display the text &#8220;Man (M)&#8221;<br \/>fx, same thing for &#8220;Fox (F)&#8221;<br \/>cx, same thing for &#8220;Chicken (C)&#8221;<br \/>bx, same thing for &#8220;corn (B)&#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-91f85dc elementor-widget elementor-widget-text-editor\" data-id=\"91f85dc\" 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>There is a difference between a variable that stores a text and one that stores a number.<br \/>When a variable is made to store a text its name must have a dollar symbol added at the end.<br \/>Eg., MyName$ = &#8220;Francois&#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-68c44b9 elementor-widget elementor-widget-text-editor\" data-id=\"68c44b9\" 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>Note: numbers can be used as texts or real numbers. For instance, a house number is usually a text.<br \/>You would not expect to carry out maths operations with a house number, like multiplying house numbers.<\/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-23db3c2 elementor-widget elementor-widget-text-editor\" data-id=\"23db3c2\" 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>To be more precise, letters and words in computer programs are known as &#8216;Strings&#8217;<\/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-4681048 elementor-widget elementor-widget-text-editor\" data-id=\"4681048\" 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 this program, RightChoice$ and LeftChoice$ are String Variables, they hold the letter entered by the user to pick the Chicken (C), Fox (F), etc.<br \/>For example RightChoice$ = &#8220;C&#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-15e29b1 elementor-widget elementor-widget-text-editor\" data-id=\"15e29b1\" 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>Setting up the program&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<\/strong><\/p><p>Here the starting positions of the words to display are being defined<\/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-47dbc04 elementor-widget elementor-widget-code-highlight\" data-id=\"47dbc04\" 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>mx=3 \/\/ Horizontal position of man\nfx=3 \/\/ ditto fox\ncx=3 \/\/ ditto chicken\nbx=3 \/\/ ditto bag of corn<\/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-9458734 elementor-widget elementor-widget-text-editor\" data-id=\"9458734\" 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><em>Procedure&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/em><\/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-b54096c elementor-widget elementor-widget-text-editor\" data-id=\"b54096c\" 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>Procedures can be thought of as program modules or sections, each Procedure having a specific purpose.<br \/>Think of procedures as building blocks.<\/p><p>They allow sections of code to be reused. A procedure can be created and tested separately from the main program.<\/p><p>This is very useful, especially in larger programs.<\/p><p>Procedures can be executed by calling them by name from any part of the program.<\/p><p>Procedures can have parameters sent to them to allow internal calculations or logical decisions to be made.<\/p><p>In this program we have created five Procedures: DRAWSCREEN, MOVERIGHT, MOVELEFT, CHECKIT and SHOWMESSAGES<\/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-c767c5d elementor-widget elementor-widget-text-editor\" data-id=\"c767c5d\" 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><em>Global&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/em><\/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-62817c3 elementor-widget elementor-widget-text-editor\" data-id=\"62817c3\" 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>Let discuss another complex concept, the Global variables. If you do not get it, no worries.<br \/>&#8220;Global&#8221; allows the variables attached to it to be seen in all parts of the program, otherwise it is local to the Procedure.<br \/>We are going to set our position variables global, so it can be used everywhere outside of the Procedures:<\/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-803d1c4 elementor-widget elementor-widget-code-highlight\" data-id=\"803d1c4\" 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 mx,fx,cx,bx<\/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-2d00a34 elementor-widget elementor-widget-text-editor\" data-id=\"2d00a34\" 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>If then Else Instruction&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/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-f72d950 elementor-widget elementor-widget-text-editor\" data-id=\"f72d950\" 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>A useful instruction made of &#8220;If&#8221; and &#8220;Then&#8221; and &#8220;Else&#8221; to make simple logical decisions.<br \/>If (something is true) Then (carry out a course of actions) Else (do some other actions)<br \/>eg., If Highscore = 1000 then Print &#8220;Player Wins&#8221; else Print &#8220;You loose&#8221;<br \/>Note: Then and Else are not mandatory as you will see below<\/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-fcca48d elementor-widget elementor-widget-text-editor\" data-id=\"fcca48d\" 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><em><strong>If End If Instruction&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/strong><\/em><\/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-302129e elementor-widget elementor-widget-text-editor\" data-id=\"302129e\" 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>A if..then carrying out multiple actions based on a logical decision:<br \/>Example:<br \/>If Highscore = 1000<br \/>Clear the screen (these are not an instructions just for the explanation)<br \/>Show winning screen<br \/>Play a sound sample<br \/>End (the game)<br \/>End If<\/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-3f0cdbc elementor-widget elementor-widget-text-editor\" data-id=\"3f0cdbc\" 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><em>Upper$ Instruction&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/em><\/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-540872a elementor-widget elementor-widget-text-editor\" data-id=\"540872a\" 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>Converts a string to the same in all capitals<br \/>Upper$(&#8220;francois&#8221;) would be converted to &#8220;FRANCOIS&#8221;. Like A$=Upper$(&#8220;francois&#8221;). In the string A$ we will find &#8220;FRANCOIS&#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-e0cab95 elementor-widget elementor-widget-text-editor\" data-id=\"e0cab95\" 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><em>Cls Instruction&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<\/em><\/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-7a5e6ff elementor-widget elementor-widget-text-editor\" data-id=\"7a5e6ff\" 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>Clear the screen. The default is to clear to the current paper colour.<br \/>If a number is added the screen wil be cleared to one of the current palette colours<br \/>CLS 0: Screen is cleared to black.<br \/>CLS 1: screen is cleared to white.<\/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-6c67dfc elementor-widget elementor-widget-text-editor\" data-id=\"6c67dfc\" 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><em>Bar Instruction&#8212;&#8212;&#8212;&#8212;-<\/em><\/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-7be8a77 elementor-widget elementor-widget-text-editor\" data-id=\"7be8a77\" 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>A bar is a filled rectangle that AOZ will draw for you.<br \/>Eg., Bar 1,1 to 100,100,<br \/>This would draw a rectangle with the top left corner at 1 pixel out from \/\/the left edge of the screen and one down from the top<br \/>and the bottom right corner at 100 across and 100 down. The rectangle fill colour would be set by the Ink command.<\/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-a29f955 elementor-widget elementor-widget-text-editor\" data-id=\"a29f955\" 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><em>Wait n Instruction&#8212;&#8212;&#8212;&#8212;&#8212;<\/em><\/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-b3472e4 elementor-widget elementor-widget-text-editor\" data-id=\"b3472e4\" 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 per Lesson 2, the Wait function followed by a number pauses the program for a given time.<br \/>The time is expressed in seconds and can be a floating point number.<\/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-907964b elementor-widget elementor-widget-text-editor\" data-id=\"907964b\" 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>Wait 10, will pause the program for 10 seconds<br \/>Wait 0.5 will pause the program for half a second<br \/>Wait 0.02 will pause the program for 1\/50th of second<br \/>This can be useful to create dramatic effect, such as when the chicken gets the corn, then the fox gets the chicken!<\/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-7f993c7 elementor-widget elementor-widget-text-editor\" data-id=\"7f993c7\" 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><em>Wait Key Instruction&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<\/em><\/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-70e585c elementor-widget elementor-widget-text-editor\" data-id=\"70e585c\" 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>Stops the program until the user presses any key<br \/>In this program it is used to allow the user to read the message and restart 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-2055acb elementor-widget elementor-widget-text-editor\" data-id=\"2055acb\" 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><em>Do Loop Instruction&#8212;&#8212;&#8212;&#8212;<\/em><\/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-c0b5fdb elementor-widget elementor-widget-text-editor\" data-id=\"c0b5fdb\" 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 Do and Loop create a\u2026. loop, a repeating sequence like the main program loop below.<\/p><p>Here are some explanations of what you will find in this Do 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-a4fefb8 elementor-widget elementor-widget-text-editor\" data-id=\"a4fefb8\" 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>Input halts the program to ask a question and stores the answer in a variable; you know that already.<br \/>For example, Input &#8220;What should he take across M,F,C,B?&#8221;;RightChoice$<br \/>When the man is on the left of the river, (mx=3) the String variable RightChoice$ is used to pass the string to the procedure MOVERIGHT.<br \/>When the man is on the right of the river, (mx = 60) the String variable LeftChoice$ is used to pass the string to the procedure MOVELEFT.<br \/>When all of the group are over the river, (position 60) the puzzle is solved and the user sees a &#8216;congratulations!&#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-c6c30ae elementor-widget elementor-widget-text-editor\" data-id=\"c6c30ae\" 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>OK, so most is explained now. Let see the game, starting by using our DRAWSCREEN procedure. To create it we simply type: &#8220;Procedure DRAWSCREEN&#8221; and add instructions, finish by placing &#8220;End Proc&#8221; at the end.<br \/>Then to use DRAWSCREEN, We will just type this name and it will execute the instructions created in the Procedure block you will see below, it is easier with an example\u2026<\/p><p><strong>Start of the Main part of the program:<\/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-1edd52a elementor-widget elementor-widget-code-highlight\" data-id=\"1edd52a\" 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>DRAWSCREEN    \/\/ This execute the DRAWSCREEN procedure that is define later.\nDo\n    If mx=3                 \/\/ If the man is on the left side of the river\n        locate 1,11         \/\/ Set text position on left side\n        Input \"What should he take across M,F,C,B? \";RightChoice$ \/\/ We use Input to display the question and get the answer in RightChoice$\n        MOVERIGHT[RightChoice$] \/\/ Send the answer to the MOVERIGHT procedure\n    End if\n\n    If mx = 60 and fx = 60 and cx = 60 and bx = 60  \/\/ All are across the river. Note: \"and\" means we add a condition to the IF\n        SHOWMESSAGES[4]                             \/\/ Message 4 is the 'Congratulations' message\n        Wait 1                                      \/\/ Wait for a while (1 second)\n        End                                         \/\/ Stops the program\n    End If\n\n    If mx=60 \/\/ Man is on right side of the river\n        Locate 55,11 \/\/ Set text position on right side\n        Input \"Who should go back? \";LeftChoice$\n        MOVELEFT[LeftChoice$]\n    End If\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-c8c74a8 elementor-widget elementor-widget-text-editor\" data-id=\"c8c74a8\" 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>Now here are the Procedures. See, you can place them anywhere in the program, not necessarily at the beginning.<\/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-1cc2778 elementor-widget elementor-widget-code-highlight\" data-id=\"1cc2778\" 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 DRAWSCREEN<\/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-92e3ef5 elementor-widget elementor-widget-text-editor\" data-id=\"92e3ef5\" 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 procedure redraws the whole screen. This is neccessary to delete the old text before printing the text in new position<\/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-d0f5351 elementor-widget elementor-widget-code-highlight\" data-id=\"d0f5351\" 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 to green, (grass)\n    Ink 26 \/\/ Set the colour for the river\n    Bar 1050,0 To 1100,1180 \/\/ Draw the river using Bar x,y to x2,y2\n<\/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-2352e61 elementor-widget elementor-widget-text-editor\" data-id=\"2352e61\" 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>Set up text colours<\/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-a1e652b elementor-widget elementor-widget-code-highlight\" data-id=\"a1e652b\" 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>    Paper 14 \/\/Green background for words\n    Pen 1 \/\/White text\n\n    \/\/ Text strings\n    Locate 1,0:Print \"A man must get three things across\"\n    Locate 1,1:Print \"a river.\"\n    Locate 1,3: Print \"He has a tiny boat so he can only\"\n    Locate 1,4:Print \"take himself and 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-b8bc95c elementor-widget elementor-widget-text-editor\" data-id=\"b8bc95c\" 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>Show strings at horizontal positions, (mx, fx etc.) defined at start and then in MOVERIGHT and MOVERIGHT procedures<\/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-ee5cb7f elementor-widget elementor-widget-code-highlight\" data-id=\"ee5cb7f\" 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>Locate mx,6:Print \"Man (M)\"\n    Locate fx,7:Print \"Fox (F)\"\n    Locate cx,8: Print \"Chicken (C)\"\n    Locate bx,9:Print \"Bag of corn (B)\"\n\n    CHECKIT \/\/ Go to the procedure that checks for a bad decision\nEnd Proc\n\nProcedure MOVERIGHT[Ch$] \/\/ The MOVERIGHT Procedure using the Ch$ variable as a parameter\n    Ch$ = Upper$(Ch$)  \/\/ Change users input to capitals because we cannot tell if the user will enter capitals or lower case<\/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-218bc13 elementor-widget elementor-widget-text-editor\" data-id=\"218bc13\" 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>Therefore one of the following letters: &#8220;M&#8221;, &#8220;F&#8221;, &#8220;C&#8221;, &#8220;B&#8221; or &#8220;m&#8221;, &#8220;f&#8221;, &#8220;c&#8221;, &#8220;b&#8221; has been sent to this procedure and is stored in the string variable Ch$<\/p><p>Define text positions on the right of the river<\/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-a4cef08 elementor-widget elementor-widget-code-highlight\" data-id=\"a4cef08\" 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>    If Ch$=\"M\" then mx=60 \/\/ Man only\n    If Ch$=\"F\" then fx=60:mx=60 \/\/ Man always has to cross the river with the fox, chicken or bag of corn\n    If Ch$=\"C\" then cx=60:mx=60 \/\/ Ditto\n    If Ch$=\"B\" then bx=60:mx=60 \/\/ Ditto\n    DRAWSCREEN  \/\/ A Procedure can be called from a Procedure, here to redraw the screen\nEnd Proc\n\nProcedure MOVELEFT[Ch$]<\/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-e679610 elementor-widget elementor-widget-text-editor\" data-id=\"e679610\" 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 notes in MOVERIGHT<\/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-ae2ebe7 elementor-widget elementor-widget-code-highlight\" data-id=\"ae2ebe7\" 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>    Ch$ = Upper$(Ch$)\n    If Ch$=\"M\" then mx=3\n    If Ch$=\"F\" then fx=3:mx=3\n    If Ch$=\"C\" then cx=3:mx=3\n    If Ch$=\"B\" then bx=3:mx=3\n    DRAWSCREEN\nEnd Proc\n\nProcedure CHECKIT<\/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-da78bdb elementor-widget elementor-widget-text-editor\" data-id=\"da78bdb\" 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 a bad decision, using the text positions, (mx, fx etc.) to decide what message to show<br \/>Fox, Chicken and bag of corn are together but man is not with them.<br \/>The &#8216;<>&#8216; characters mean not equal to (or different to)<\/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-8db45f9 elementor-widget elementor-widget-code-highlight\" data-id=\"8db45f9\" 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>    If fx = cx and cx = bx and fx <> mx  Then SHOWMESSAGES[1] \/\/ Notice the parameter sent to the procedure SHOWMESSAGES[] inside the square brackets\n<\/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-9fc9174 elementor-widget elementor-widget-text-editor\" data-id=\"9fc9174\" 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>Fox and Chicken are together man is not with 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-fe8ca7b elementor-widget elementor-widget-code-highlight\" data-id=\"fe8ca7b\" 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>If fx=cx and mx<>cx Then SHOWMESSAGES[2] \/\/ <> means different then so here if both fx=cx and mx is different than cx\n\n    \/\/ Chicken and Bag of corn are together but man is not with them\n    If cx=bx and mx<>cx Then SHOWMESSAGES[3]\n    End Proc\n<\/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-574ee8b elementor-widget elementor-widget-text-editor\" data-id=\"574ee8b\" 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>Show appropriate message<br \/>Prepare the print format for the message 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-01a561b elementor-widget elementor-widget-code-highlight\" data-id=\"01a561b\" 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 SHOWMESSAGES[M]\nCls 0 \/\/ Clear screen to black\nPaper 0 \/\/ Black paper\nPen 4 \/\/ Red text\nLocate 0,9 \/\/ Locate messages\nCurs Off \/\/ Turn Off the flashing screen cursor <\/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-ae08bb7 elementor-widget elementor-widget-text-editor\" data-id=\"ae08bb7\" 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 parameter sent to the procedure is stored in variable &#8216;M&#8217;. It is used to select and print one of three 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-cc5891e elementor-widget elementor-widget-code-highlight\" data-id=\"cc5891e\" 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>If M = 1       \nCentre \"The chicken ate the corn...\" \/\/ Centered at the location given\nWait 1   \/\/ One second pause for dramatic effect!    \nLocate 1,11 \/\/ Move down a bit  \nCentre \"...then the fox ate the Chicken!\"\nEnd if\nIf M = 2 Then Centre \"The fox ate the Chicken!\" \nIf M = 3 Then  Centre \"The chicken ate the corn!\" \nIf M = 4 then  Centre \"Congratulations, you did it! Reload the page to run again\"\nPaper 0: Pen 1 \/\/ Go back to normal paper and text colours \nPop Proc \/\/ Do not show the 'Press Any Key' message \nLocate 1,22: Centre \"Press any key\" \nCurs On \/\/ Turn the cursor on again \nWait key \/\/ Wait for user key press\nmx=3:fx=3:cx=3:bx=3 \/\/ Reset start positions \nDRAWSCREEN\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-4e399cd elementor-widget elementor-widget-text-editor\" data-id=\"4e399cd\" 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-01a9060 elementor-widget elementor-widget-text-editor\" data-id=\"01a9060\" 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>OK so take a deep breath. You will need to spend some time to understand the logic of the program. But you will learn a lot.<br \/>Not only many functions, concepts of programming but also the logic. It is very normal that you may need some time, but I can tell you that once you understand that\u2026 you will be able to achieve great things and will be knowledgeable enough to start the program you are dreaming of.<\/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-11f31a8 elementor-widget elementor-widget-text-editor\" data-id=\"11f31a8\" 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>\ud83d\ude42 <a href=\"https:\/\/rayshell.de\/en\/lesson-4\/\"><strong>Let&#8217;s go to Lesson 4<\/strong><\/a><\/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-a2b2d75 elementor-widget elementor-widget-text-editor\" data-id=\"a2b2d75\" 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-caed0c2\" data-id=\"caed0c2\" 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 3 Welcome to your AOZ Studio Lesson 3 &#8211; Written by Neil John Ives This lesson will later be enhanced with Lesson 6 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 &#8220;My Application&#8221; [&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-19801","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 3 - 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-3\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Lesson 3 - RayShell Computer Department\" \/>\n<meta property=\"og:description\" content=\"Lesson 3 Welcome to your AOZ Studio Lesson 3 &#8211; Written by Neil John Ives This lesson will later be enhanced with Lesson 6 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 &#8220;My Application&#8221; [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rayshell.de\/en\/lesson-3\/\" \/>\n<meta property=\"og:site_name\" content=\"RayShell Computer Department\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-25T00:57:59+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=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-3\\\/\",\"url\":\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-3\\\/\",\"name\":\"Lesson 3 - RayShell Computer Department\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/rayshell.de\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-3\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-3\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/rayshell.de\\\/wp-content\\\/uploads\\\/2023\\\/05\\\/new_custom_project.png\",\"datePublished\":\"2022-10-25T00:37:18+00:00\",\"dateModified\":\"2023-10-25T00:57:59+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-3\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-3\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/rayshell.de\\\/en\\\/lesson-3\\\/#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-3\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/rayshell.de\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Lesson 3\"}]},{\"@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 3 - 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-3\/","og_locale":"en_US","og_type":"article","og_title":"Lesson 3 - RayShell Computer Department","og_description":"Lesson 3 Welcome to your AOZ Studio Lesson 3 &#8211; Written by Neil John Ives This lesson will later be enhanced with Lesson 6 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 &#8220;My Application&#8221; [&hellip;]","og_url":"https:\/\/rayshell.de\/en\/lesson-3\/","og_site_name":"RayShell Computer Department","article_modified_time":"2023-10-25T00:57:59+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":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/rayshell.de\/en\/lesson-3\/","url":"https:\/\/rayshell.de\/en\/lesson-3\/","name":"Lesson 3 - RayShell Computer Department","isPartOf":{"@id":"https:\/\/rayshell.de\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rayshell.de\/en\/lesson-3\/#primaryimage"},"image":{"@id":"https:\/\/rayshell.de\/en\/lesson-3\/#primaryimage"},"thumbnailUrl":"https:\/\/rayshell.de\/wp-content\/uploads\/2023\/05\/new_custom_project.png","datePublished":"2022-10-25T00:37:18+00:00","dateModified":"2023-10-25T00:57:59+00:00","breadcrumb":{"@id":"https:\/\/rayshell.de\/en\/lesson-3\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rayshell.de\/en\/lesson-3\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rayshell.de\/en\/lesson-3\/#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-3\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rayshell.de\/en\/"},{"@type":"ListItem","position":2,"name":"Lesson 3"}]},{"@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\/19801","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=19801"}],"version-history":[{"count":27,"href":"https:\/\/rayshell.de\/en\/wp-json\/wp\/v2\/pages\/19801\/revisions"}],"predecessor-version":[{"id":32004,"href":"https:\/\/rayshell.de\/en\/wp-json\/wp\/v2\/pages\/19801\/revisions\/32004"}],"wp:attachment":[{"href":"https:\/\/rayshell.de\/en\/wp-json\/wp\/v2\/media?parent=19801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}