Giới thiệu sản phẩm

turtle crossing road:
import turtle
from player import Player
from turtle import Screen
import time

screen = Screen()
screen.title("Turtle crossy road")
screen.setup(width=600, height=500)
screen.bgcolor("white")
screen.tracer(0)


def create_color(r, g, b):
  return (r / 255, g / 255, b / 255)


thy = Player(create_color(242, 213, 213), (150, 0))
triet = Player(create_color(84, 82, 83), (-150, 0))

screen.onkeypress(thy.go_up, "Up")
screen.onkeypress(thy.go_down, "Down")
screen.onkeypress(triet.go_up, "w")
screen.onkeypress(triet.go_down, "s")
screen.listen()

counter = 0

square = turtle.Turtle()
square.shape("square")
square.color("black")
square.goto(-300, 0)
square.penup()

game_is_on = True
while game_is_on:
  time.sleep(0.1)
  screen.update()
  counter += 1
  square.forward(10)

screen.mainloop()
Hình ảnh sản phẩm
Hãy bình luận để nhặt 100 thóc nhé
Huỳnh Kiến Huy

quá là xịn sò luôn ạ

Trả lời 2d

Đăng nhập để tham gia bình luận


Huỳnh Kiến Huy

Trả lời 2d

Đăng nhập để tham gia bình luận


Huỳnh Kiến Huy

Trả lời 2d

Đăng nhập để tham gia bình luận


Huỳnh Kiến Huy

giỏi quá ạ

Trả lời 2d

Đăng nhập để tham gia bình luận


Đào Huỳnh Đăng Khôi

i like it✨

Trả lời 125d

Đăng nhập để tham gia bình luận


Xem thêm

Đăng nhập để tham gia bình luận

Thông tin tác giả

Địa vị cộng đồng: Nông dân

Sản phẩm cùng tác giả

Sản phẩm liên quan

    Không có sản phẩm nào

Bạn muốn thử làm game không?