# OLD 5: Replit, GitHub, and repositories (Oh my!)

## Expectations

### Learning Targets <a href="#learning-targets" id="learning-targets"></a>

* I can connect replit to my github repositories
* I can clone an existing repository, fork it, and extend the code to my own project.

### Assessments <a href="#assessments" id="assessments"></a>

* You will submit a link to your GitHub repo.
* You will create a game based on existing turtle classes
* You will be asked regular comprehension questions about Python and Github.

## Setup your github account.

{% embed url="<https://github.com>" %}

{% embed url="<https://youtu.be/iV3rf5eMT-4>" %}

## Setup your replit account and connect your github.

#### Join Replit I2P team with the link below.

{% embed url="<https://replit.com/teams/join/hgeffnguajivskqklikdnrmvtzpeffxb-intro-to-programming-2023>" %}

{% embed url="<https://replit.com>" %}

## Fork github.com/MrVanek/Interactive-Turtles and clone repository into replit.

{% embed url="<https://youtu.be/4O88vo3FaKo>" %}

{% embed url="<https://youtu.be/iS-hSCRfgtY>" %}

## Adding Moving Turtle

{% embed url="<https://youtu.be/4kb7QIywRb4>" %}

```
from turtle import Turtle


class ClassName (Turtle):
    def __init__(self, starting_x, starting_y):
        Turtle.__init__(self)
        self.starting_x = starting_x
        self.starting_y = starting_y
        
        # General setup
        # self.color("black")
        # self.penup()
        # self.shape("turtle")
        # self.goto(self.starting_x, self.starting_y)
        
    def method_example(self):
        pass
        ## change the name and make the method work
```

## Assignment and Rubric

Create an interactive turtle application of your own design. This can be a game or other interactive program, but it must use at least two of the three types of turtle classes we have outlined (moving turtle, keyboard turtle, clickable turtle).

* **3 pts** - Program works without errors
* **3pts** - Program uses two classes of turtle
* **3pts** - Program is interactive. Users can DO something with the program.
* **1pts** - Program is cleaned up (unused imports have been deleted, for example)

##

## How do I...

### ...make multiple things move?

{% embed url="<https://youtu.be/_n3qJklHjR8>" %}

### ...write text on the screen?

{% embed url="<https://youtu.be/1vwIShtQr-U>" %}

### ...stop movement with walls?

{% embed url="<https://youtu.be/uJREYW7L3WQ>" %}

### ...make a ball move diagonally and bounce off multiple sides of the room?

{% embed url="<https://youtu.be/pEJSQ8Y-VmY>" %}

### ... create a background image and have it change later?

{% embed url="<https://youtu.be/7YTAWsqzDlY>" %}

### ...set up and check a timer

{% embed url="<https://youtu.be/14gEXdWfm1s>" %}

### ...add a start screen

{% embed url="<https://youtu.be/tZvX66v9HmI>" %}

### ...Save a High Score in a File?

{% embed url="<https://youtu.be/3RpRahCFDtQ>" %}

### ... add points from different objects to a single score?

{% embed url="<https://youtu.be/5TWzrfUStPA>" %}

### ... get objects to check each other for different properties?

{% embed url="<https://youtu.be/IosOxvRuYCE>" %}

### **...find the x and y position of my mouse on the screen?**

{% embed url="<https://youtu.be/z8R_5ZO9Afk>" %}

### ...create a custom shaped turtle?

{% embed url="<https://youtu.be/lIVaHIGlMVg>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://gilmour.online/compsci/pnr/5-replit-github-and-repositories-oh-my-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
