űrmw2.0 Englishprojectsize[744 426]turtles-have[]globals[]globals-list[globals-vars] shapesŹprocedurestext{\rtf1\ansi\deff0\deftab720{\fonttbl{\f0\fswiss MS Sans Serif;}{\f1\froman\fcharset2 Symbol;}{\f2\fswiss\fprq2 System;}{\f3\fswiss Arial;}{\f4\fmodern\fprq1 Courier New;}} {\colortbl\red0\green0\blue0;\red0\green128\blue128;} \deflang3081\pard\plain\lang1033\f4\fs20\cf1 ; Purpose: To play with keyboard controls \par ; Copyright \plain\f4\fs20\cf1 \'a9\plain\lang1033\f4\fs20\cf1 2004 by Rupert Russell \par ; e-mail: r.russell@ballarat.edu.au \par ; URL: http://velorum.ballarat.edu.au/~rrussell/microworlds/ \par ; Created: October 21, 2004 \par ; \par ; This program is free software; you can redistribute it and/or modify \par ; it under the terms of the GNU General Public License as published by \par ; the Free Software Foundation; either version 2 of the License, or \par ; (at your option) any later version. \par ; \par ; This program is distributed in the hope that it will be useful, \par ; but WITHOUT ANY WARRANTY; without even the implied warranty of \par ; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \par ; GNU General Public License for more details. \par ; \par ; You should have received a copy of the GNU General Public License \par ; along with this program; if not, write to the Free Software \par ; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. \par ; ----------------------------------------------------------------------\plain\lang1033\f4\fs20\cf0 \par \plain\f4\fs20\b \par \par to startup\plain\f4\fs20 \par make "step 50 \par make "line_size 1 \par move_turtle \par \plain\f4\fs20\b end \par \par to move_turtle\plain\f4\fs20 \par pd \par \par \plain\f4\fs20\cf1 ; read the key pressed\plain\f4\fs20 \par make "ch ascii readchar \par \par if :ch = 38 [t1, seth 0 fd :step]\tab \plain\f4\fs20\cf1 \tab ; north\plain\f4\fs20 \par if :ch = 40 [t1, seth 180 fd :step]\tab \plain\f4\fs20\cf1 \tab ; south\plain\f4\fs20 \par if :ch = 39 [t1, seth 90 fd :step]\tab \plain\f4\fs20\cf1 \tab ; east\plain\f4\fs20 \par if :ch = 37 [t1, seth 270 fd :step]\tab \plain\f4\fs20\cf1 \tab ; west \par \plain\f4\fs20 \par \par \plain\f4\fs20\cf1 ; < or , reduce step size \par \plain\f4\fs20 if (or :ch = 46 :ch = 62 )[ \par make "step (:step + 1) \par cc \par show (se "step "size :step) \par show se "pensize :pensize \par ] \par \par \par \plain\f4\fs20\cf1 ; > or . increase step size\plain\f4\fs20 \par if (or :ch = 44 :ch = 60) [ \par if :step > 1 [ \par make "step (:step - 1) \par cc \par show (se "step "size :step) \par show se "pensize :pensize \par ] \par ] \par \par \plain\f4\fs20\cf1 ; x or X increase pensize\plain\f4\fs20 \par if (or :ch = 120 :ch = 88) [ \par if :line_size < 100[ \par make "line_size :line_size + 1 \par cc \par show (se "step "size :step) \par show se "line_size :line_size \par ] \par ] \par \par \plain\f4\fs20\cf1 ; z or Z decreade pensize\plain\f4\fs20 \par if (or :ch = 122 :ch = 90)[ \par if :line_size > 1 [ \par make "line_size :line_size - 1 \par cc \par show (se "step "size :step) \par show se "line_size :line_size \par ] \par ] \par \par setpensize :line_size \par \par setc (random 15) + 125\tab \plain\f4\fs20\cf1 \tab ; add some colour\plain\f4\fs20 \par \par move_turtle\tab \tab \tab \tab \plain\f4\fs20\cf1 ; repeat the whole process again\plain\f4\fs20 \par \par \plain\f4\fs20\b end \par \plain\lang1033\f4\fs20 \par \par \par } Ůcpagenamepage1curturtlet1curtexttext1transition0Dturtle-deamons[[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []]Cmouse-deamons[[] [] [] [] [] [] [] [] [] [] [] [] [] [] [] []]bg0Â^buffer認^$6HZl~˘´ĆŘęü 2DVhzŒ°Ôř^šÖĂhI ˇ\ ču  , P q ’ ° Î ě ( F d ‚   Ç î  < ™ ä S  (”xŰDt§×:jšĘú*ZŠşů8wśpÓ0‡Ţ5¤űXˆ¸čHx¨Ř8n¤Ú @sŚŮ Br˘Ň2b’Âň"R‚˛âBr˘ŇD€źř‚ ú ˘!2"ś":#Ä#r$ę$t%Ą%Ë%ř%%&O&y&Ł&Í&÷&!'K'u'Ÿ'Ň' (D(}())*Ľ* +›+,Á,3-ˇ-ę- .V.Œ.ź.ě./L/|/Ź/Ü/ 0<0l0œ0Ě0ů0&1S1€1°1ŕ12=2j2—2Ç2÷2*3]33Ă3ö3)4\44Â4ő4"5R55ë5-6o6˙6}78ť8?9˝9M:ď:s;÷;'<W<<Ă<ů</=e=›=Î=ţ=.>U>|>Ä> ?H?„?@†@AŹA$B–BC°C.DŹDĐDôDE larger steps \par \par z thicker line \par x thicker line\plain\lang1033\f3\fs20 \par }