Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add files via upload #83

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Please see [The Coding Train Code of Conduct](https://github.com/CodingTrain/Code-of-Conduct)
Please see [The Coding Train Code of Conduct](https://github.com/CodingTrain/Code-of-Conduct)
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
TBD
TBD
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2018 Daniel Shiffman

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2018 Daniel Shiffman
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
334 changes: 167 additions & 167 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,167 +1,167 @@
# Logo
Repo for implementation of Logo in JavaScript p5

<details><summary>Supported commands</summary>
<p>

> The description(s) and/or example(s) of the commands were taken (and corrected for this interpreter) from the [Berkeley Logo Reference Manual](https://people.eecs.berkeley.edu/~bh/v2ch14/manual.html) under MIT license.

### Forward
Moves the turtle forward, in the direction that it's facing, by the specified distance (measured in turtle steps).
* `fd units`

### Backward
Moves the turtle backward, i.e., exactly opposite to the direction that it's facing, by the specified distance. (The heading of the turtle does not change.)
* `bd units`

### Right
Turns the turtle clockwise by the specified angle, measured by default in degrees (1/360 of a circle).
* `rt angle`

### Left
Turns the turtle counterclockwise by the specified angle, measured by default in degrees (1/360 of a circle).
* `lt angle`

### Penup
Sets the pen's position to UP, without changing its mode.
* `pu`

### Pendown
Sets the pen's position to DOWN, without changing its mode.
* `pd`

### Pensize
Sets the thickness of the pen with the given the value. Note: If it's given a negative value, by default will be thickness of 1.
* `pensize thicknessValue`

### Set X Y
Moves the turtle to an absolute position in the graphics window. The two inputs are numbers, the X and Y coordinates.
* `setxy coordinateX coordinateY`

### Set X
Moves the turtle horizontally from its old position to a new absolute horizontal coordinate. The input is the new X coordinate.
* `setx coordinateX`

### Set Y
Moves the turtle vertically from its old position to a new absolute vertical coordinate. The input is the new Y coordinate.
* `sety coordinateY`

### Home
Moves the turtle to the center of the screen.
* `home`

### Radians
Changes the angle values to be used as radians
* `radians`

### Degrees
Changes the angle values to be used as degrees
* `degrees`

### Repeat
uns the following instruction list repeatedly, num times. Can be nested.
* `repeat num [instruction list]`

### Color
Sets the pen color given the hexadecimal value in format `#FFF / #FFFFFF`.
* `color hexadecimalValue`

### Color RGB
Sets the pen color given the RGB value.
* `colorrgb [red green blue]`

### Author
Prints the given in the developer console
* `author [author website twitter]`

</p>
</details>

## Useful links
* [Live Web Demo](https://codingtrain.github.io/Logo/)
* [Coding Challenge Part 1](https://thecodingtrain.com/CodingChallenges/121.1-logo-interpreter.html) and
[Coding Challenge Part 2](https://thecodingtrain.com/CodingChallenges/121.2-logo-interpreter.html)
* [Coding Challenge Part 1 on Youtube](https://www.youtu.be/i-k04yzfMpw) and
[Coding Challenge Part 2 on Youtube](https://www.youtu.be/aOqEm101fms)
* [Logo Wikipedia Page](https://en.wikipedia.org/wiki/Logo_(programming_language))
* [More Information about Logo and some Examples](http://cs.brown.edu/courses/bridge/1997/Resources/LogoTutorial.html)

## Getting Started

Getting started just takes 3 simple steps, each one is a command in the terminal.

1. Clone this GitHub repository.
2. Navigate inside the repository directory on your machine.
3. Host the directory with a local web server.

There are a few easy ways to achieve step number 3 depending on what you already have installed:

<details><summary>Node Package Manager (NPM)</summary>
<p>

> If you have NPM installed you can use the [live-server](https://www.npmjs.com/package/live-server) NPM package.
> The neat thing about live-server is that it automatically refreshes the web page every time you change a file.
>
> If you don't have NPM installed you can download and install it [here](https://www.npmjs.com/get-npm).
>
> Once you have NPM, install live-server globally with `npm install --global live-server`.
>
> Then run the following commands in your terminal.
> ```
> git clone https://github.com/CodingTrain/Logo.git
> cd Logo
> live-server --port=8080 .
> ```
> Don't forget the dot at the end of the command on MacOS!
>
> Finally, you can open [http://localhost:8080](http://localhost:8080) in your browser and you're away!
>
> Note that when you close the terminal window, the web server will stop as well.

</p>
</details>

<br/>

<details><summary>Python 2.x</summary>
<p>

> You can use the [SimpleHTTPServer](https://docs.python.org/2/library/simplehttpserver.html) python module.
>
> If you don't have Python 2 installed you can download and install it [here](https://www.python.org/downloads/).
>
> Then run the following commands in your terminal.
> ```
> git clone https://github.com/CodingTrain/Logo.git
> cd Logo
> python -m SimpleHTTPServer 8080
> ```
> Finally, you can open [http://localhost:8080](http://localhost:8080) in your browser and you're away!
>
> Note that when you close the terminal window, the web server will stop as well.

</p>
</details>

<br/>

<details><summary>Python 3.x</summary>
<p>

> You can use the [http.server](https://docs.python.org/3/library/http.server.html) python module.
>
> If you don't have Python 3 installed you can download and install it [here](https://www.python.org/downloads/).
>
>
> Then run the following commands in your terminal.
> ```
> git clone https://github.com/CodingTrain/Logo.git
> cd Logo
> python3 -m http.server 8080
> ```
> Finally, you can open [http://localhost:8080](http://localhost:8080) in your browser and you're away!
>
> Note that when you close the terminal window, the web server will stop as well.

</p>
</details>
# Logo
Repo for implementation of Logo in JavaScript p5
<details><summary>Supported commands</summary>
<p>
> The description(s) and/or example(s) of the commands were taken (and corrected for this interpreter) from the [Berkeley Logo Reference Manual](https://people.eecs.berkeley.edu/~bh/v2ch14/manual.html) under MIT license.
### Forward
Moves the turtle forward, in the direction that it's facing, by the specified distance (measured in turtle steps).
* `fd units`
### Backward
Moves the turtle backward, i.e., exactly opposite to the direction that it's facing, by the specified distance. (The heading of the turtle does not change.)
* `bd units`
### Right
Turns the turtle clockwise by the specified angle, measured by default in degrees (1/360 of a circle).
* `rt angle`
### Left
Turns the turtle counterclockwise by the specified angle, measured by default in degrees (1/360 of a circle).
* `lt angle`
### Penup
Sets the pen's position to UP, without changing its mode.
* `pu`
### Pendown
Sets the pen's position to DOWN, without changing its mode.
* `pd`
### Pensize
Sets the thickness of the pen with the given the value. Note: If it's given a negative value, by default will be thickness of 1.
* `pensize thicknessValue`
### Set X Y
Moves the turtle to an absolute position in the graphics window. The two inputs are numbers, the X and Y coordinates.
* `setxy coordinateX coordinateY`
### Set X
Moves the turtle horizontally from its old position to a new absolute horizontal coordinate. The input is the new X coordinate.
* `setx coordinateX`
### Set Y
Moves the turtle vertically from its old position to a new absolute vertical coordinate. The input is the new Y coordinate.
* `sety coordinateY`
### Home
Moves the turtle to the center of the screen.
* `home`
### Radians
Changes the angle values to be used as radians
* `radians`
### Degrees
Changes the angle values to be used as degrees
* `degrees`
### Repeat
uns the following instruction list repeatedly, num times. Can be nested.
* `repeat num [instruction list]`
### Color
Sets the pen color given the hexadecimal value in format `#FFF / #FFFFFF`.
* `color hexadecimalValue`
### Color RGB
Sets the pen color given the RGB value.
* `colorrgb [red green blue]`
### Author
Prints the given in the developer console
* `author [author website twitter]`
</p>
</details>
## Useful links
* [Live Web Demo](https://codingtrain.github.io/Logo/)
* [Coding Challenge Part 1](https://thecodingtrain.com/CodingChallenges/121.1-logo-interpreter.html) and
[Coding Challenge Part 2](https://thecodingtrain.com/CodingChallenges/121.2-logo-interpreter.html)
* [Coding Challenge Part 1 on Youtube](https://www.youtu.be/i-k04yzfMpw) and
[Coding Challenge Part 2 on Youtube](https://www.youtu.be/aOqEm101fms)
* [Logo Wikipedia Page](https://en.wikipedia.org/wiki/Logo_(programming_language))
* [More Information about Logo and some Examples](http://cs.brown.edu/courses/bridge/1997/Resources/LogoTutorial.html)
## Getting Started
Getting started just takes 3 simple steps, each one is a command in the terminal.
1. Clone this GitHub repository.
2. Navigate inside the repository directory on your machine.
3. Host the directory with a local web server.
There are a few easy ways to achieve step number 3 depending on what you already have installed:
<details><summary>Node Package Manager (NPM)</summary>
<p>
> If you have NPM installed you can use the [live-server](https://www.npmjs.com/package/live-server) NPM package.
> The neat thing about live-server is that it automatically refreshes the web page every time you change a file.
>
> If you don't have NPM installed you can download and install it [here](https://www.npmjs.com/get-npm).
>
> Once you have NPM, install live-server globally with `npm install --global live-server`.
>
> Then run the following commands in your terminal.
> ```
> git clone https://github.com/CodingTrain/Logo.git
> cd Logo
> live-server --port=8080 .
> ```
> Don't forget the dot at the end of the command on MacOS!
>
> Finally, you can open [http://localhost:8080](http://localhost:8080) in your browser and you're away!
>
> Note that when you close the terminal window, the web server will stop as well.
</p>
</details>
<br/>
<details><summary>Python 2.x</summary>
<p>
> You can use the [SimpleHTTPServer](https://docs.python.org/2/library/simplehttpserver.html) python module.
>
> If you don't have Python 2 installed you can download and install it [here](https://www.python.org/downloads/).
>
> Then run the following commands in your terminal.
> ```
> git clone https://github.com/CodingTrain/Logo.git
> cd Logo
> python -m SimpleHTTPServer 8080
> ```
> Finally, you can open [http://localhost:8080](http://localhost:8080) in your browser and you're away!
>
> Note that when you close the terminal window, the web server will stop as well.
</p>
</details>
<br/>
<details><summary>Python 3.x</summary>
<p>
> You can use the [http.server](https://docs.python.org/3/library/http.server.html) python module.
>
> If you don't have Python 3 installed you can download and install it [here](https://www.python.org/downloads/).
>
>
> Then run the following commands in your terminal.
> ```
> git clone https://github.com/CodingTrain/Logo.git
> cd Logo
> python3 -m http.server 8080
> ```
> Finally, you can open [http://localhost:8080](http://localhost:8080) in your browser and you're away!
>
> Note that when you close the terminal window, the web server will stop as well.
</p>
</details>
Loading