X coder
X coder

Reputation: 55

How to hide the turtle arrow while keeping the turtle shape?

With my turtle in black i create a shape (the white rectangle) and not a line ! Then i move the white shape at the bottom of the screen to create a paddle that must move from left to right. I have to keep the shape but remove the black arrow. How to do ?

enter image description here

from turtle import Turtle


class Paddle(Turtle):
    def __init__(self):
        super().__init__()
        self.shape("square")  # what i want to keep to move it from left to right
        self.penup()
        self.shapesize(stretch_wid=1, stretch_len=5)
        self.color("white")
        self.goto(x=0, y=-260)

        # I create my turtle, now I can move the shape, the white rectangle.

And then I move my turtle shape from left to right. In general I leave the background black and we don't see the turtle (the shape rather), but here I am melting is lighter, so we see the black arrow in the center of the screen.

Upvotes: 1

Views: 1392

Answers (1)

White Hat Hacker
White Hat Hacker

Reputation: 64

hideturtle() using to make a circle (for example) without show the turtle arrow

You can see this source:

https://www.geeksforgeeks.org/turtle-hideturtle-function-in-python/

Upvotes: 1

Related Questions