www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

index.html (3119B)


      1 <!DOCTYPE html>
      2 <html>
      3 	<head>
      4 		<title>banna - useless things</title>
      5 		<meta name="viewport" content="width=device-width, initial-scale=1">
      6 		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      7 		<link rel="stylesheet" href="/styles/style.css" />
      8 		<link rel="stylesheet" href="/styles/look.css" />
      9 		<link rel="stylesheet" href="/styles/codetheme.css" />
     10 		<script src="/scripts/highlight.js"></script>
     11 		<script>hljs.initHighlightingOnLoad();</script>
     12 	</head>
     13 
     14 	<body>
     15 		<div id="sidebar">
     16 			<div id="logo">
     17 				<a href="/">
     18 					<img src="/banna.png" alt="banna.tech" height="45" width="201" />
     19 				</a>
     20 			</div>
     21 			<div id="nav">
     22 				<a class="" href="/post">blog</a>
     23 				<a class="current" href="/things">things</a>
     24 				<a class="" href="/about">about</a>
     25 			</div>
     26 		</div>
     27 
     28 		<div id="wrapper">
     29 			<div id="content">
     30 <div class="post">
     31     <a href="/things/post/turtle_console" class="link"><h1 class="header">Turtle Console</h1></a>
     32     <div class="projectdescription">
     33 <iframe src="//static.banna.tech/turtleconsole" width="700" height="600" style="border:none;"></iframe>
     34 
     35 <p>You can view it <a href="//static.banna.tech/turtleconsole">here</a></p>
     36 
     37 <h2>The commands are as follows:</h2>
     38 
     39 <ul>
     40 <li><code>go(amount)</code> -> moves turtle forward in the specified amount of pixels</li>
     41 <li><code>move(amount)</code> -> moves turtle without drawing on the canvas</li>
     42 <li><code>r(degrees)</code> / <code>right(degrees)</code> -> Turns the turtle right in the specified amount of degrees</li>
     43 <li><code>l(degrees)</code> / <code>left(degrees)</code> -> Turns the turtle left in the specified amount of degrees</li>
     44 <li><code>tran(x,y)</code> -> Changes the turtle's coordinates by adding x and y to current location</li>
     45 <li><code>set(x,y)</code> -> Sets the absolute value of the turtles coordinates</li>
     46 <li><code>color(#RRGGBB)</code> -> Sets the "pen" color</li>
     47 <li><code>size(pixels)</code> -> Sets the line width</li>
     48 <li><code>circ(radius)</code> -> Creates a circle with the turtle in the center</li>
     49 </ul>
     50 
     51 <h2>Special commands:</h2>
     52 
     53 <ul>
     54 <li><code>v [variable name] = [value]</code> -> sets a variable</li>
     55 <li><code>if ([condition]) ([code])</code> -> Executes specific code on a condition</li>
     56 <li><code>for ([iterations]) ([code])</code> -> Executes a block of code for an amount of interations, specified by [iterations]</li>
     57 </ul>
     58 
     59 <h2>Notes</h2>
     60 
     61 <p>In the "code box" or inside an if condition/for loop, every command must be trailed with a ;</p>
     62 
     63 <h2>Examples</h2>
     64 
     65 <p><img alt="Screenshot" src="//i.banna.tech/10projects.png" /></p>
     66 
     67 <p>The following command will produce this output: <br/><code>for (36) (for (4) (l(90);go(100););l(10);)</code></p>
     68 
     69 <p><img alt="Screenshot" src="//i.banna.tech/11projects.png" /></p>
     70 
     71 <p>Aperture Science! Credit goes to a redstone sheep</p>
     72 
     73 <pre><code>for (1) (
     74   tran(0,300);
     75   l(20);
     76   for (8) (
     77     for (12) (
     78       go(15);
     79       l(3);
     80     );
     81     l(130);
     82     go(242);
     83     l(135);
     84     go(127);
     85     l(59);
     86     for (15) (
     87       move(15);
     88       l(3);
     89     );
     90   );
     91 );</code></pre>
     92     </div>
     93 </div>
     94 
     95 
     96 			</div>
     97 		</div>
     98 	</body>
     99 </html>