Giter Club home page Giter Club logo

tinyturtledirections's Introduction

Unit 8 Project 1 || Tiny Turtle Directions

Imgur

Tiny Turtle is a fun Computer Science activity created by a ScriptEd volunteer that teaches students how to use JavaScript functions. The original documentation can be found here.

#Directions for Set Up Step 1: New Repo
Create a new GitHub repo called TinyTurtle.


**Step 2: Clone** Clone your new repo into a Cloud 9 workspace with a similar name.
**Step 3: New Files** Create three new files in this workspace. Name these new files...
  • index.html
  • style.css
  • script.js

**Step 4: index.html** Copy and paste the code below into you index.html file
<!DOCTYPE html>
<html>
<head>
  
  <title>Tiny Turtle</title>
  <link rel="stylesheet" type="text/css" href="style.css">
  
</head>
<body>
    <h1>Tiny Turtle</h1>
  <canvas></canvas>
  
  <script src="tinyTurtle.js"></script>
  <script src="script.js"></script>
</body>
</html>

**Step 5: Canvas CSS** You will notice a new HTML tag is being used. This tag is called `canvas` In the `style.css` page give your canvas tag the following attributes
  • a width of 400px
  • a height of 400px
  • a border (any style)

**Step 6: JavaScript Set Up** In the `script.js` page paste the code below on line 1
	TinyTurtle.apply(window); 

Step 7: Play Turtle
Tiny Turtle understands the following commands:

  • forward();
  • right();
  • left();
  • stamp(); <------ This shows which direction the turtle is pointing.

Use the commands above to make Tiny Turtle travel in a Square.

Step 8: House
For the final piece of this project create a house (square with a triangle ontop)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.