Download net.py from Workfun/Pong: direct link, hf CLI and curl.
- Browser
- Download file 422 Bytes
-
https://huggingface.co/Workfun/Pong/resolve/main/net.py
- Command line
-
hf download hf://Workfun/Pong/net.py
-
curl -L -o net.py https://huggingface.co/Workfun/Pong/resolve/main/net.py
422 Bytes
| from turtle import Turtle | |
| NET_COLOR = "white" | |
| def make_net(): | |
| net = Turtle() | |
| net.hideturtle() | |
| net.penup() | |
| net.color(NET_COLOR) | |
| net.goto(0, -280) | |
| net.setheading(90) | |
| keep_drawing = True | |
| while keep_drawing: | |
| if net.ycor() > 300: | |
| keep_drawing = False | |
| else: | |
| net.pendown() | |
| net.forward(30) | |
| net.penup() | |
| net.forward(30) |