[Mã code 31020]31020]
Phí tải: 250 Xu [1Xu = 1.000đ]250 Xu [1Xu = 1.000đ]
Danh mục
Thể loại
Nhóm code
Ngày đăng
27-5-2022
Loại file
Full code
Dung lượng
140 MB
Cam kết hỗ trợ
Không chứa mã độc
Có demo thực tế
Có hướng dẫn cài đặt
Game Pikachu cổ điển dùng ngôn ngữ Python xây dựng đầy đủ các chức năng, hiệu ứng sống động cho người chơi.
MÔ TẢ CHI TIẾT
GIỚI THIỆU
Game Pikachu xếp hình với luật chơi người chơi làm nhiệm vụ tìm những cặp Pokemon giống nhau và nối chúng lại bởi tối đa 3 đường thẳng mà không bị cản trở bởi con vật khác. Game Pikachu này sử dụng thuật toán BFS advance, quay lui để lưu lại đường đi, và thuật toán reset bảng khi không thể tìm được 2 con nối với nhau. Người chơi có tối đa 10 mạng để vượt qua 5 level. Sau mỗi 20s không tìm được chương trình sẽ đưa ra gợi ý.
YÊU CẦU MÔI TRƯỜNG
OS: Windows10
Python: Python3.5+ [đã cài đặt môi trường]
XEM THÊM ==> Hướng dẫn cài đặt chi tiết
Nguồn: Sharecode.vn
HƯỚNG DẪN CÀI ĐẶT
HƯỚNG DẪN CÀI ĐẶT VÀ SỬ DỤNG
Cách 1:
Bước 1: Sử dụng command và dùng lệnh phía dưới để cài module pygame
pip install -r requirements.txt
Bước 2: Để chạy chương trình dùng lệnh
python Pikachu.py
Cách 2:
Trong thư mục .\Pikachu\build\exe.win-amd64-3.8 có thể mở file "Pikachu.exe" để chạy chương trình sử dụng luôn.
CODE GẦN GIỐNG
CODE GỢI Ý CHO BẠN
BÌNH LUẬN
ĐÁNH GIÁ
1 Đánh giá
Code rất tốt [1][1]
Code tốt [0][0]
Code rất hay [0][0]
Code hay [0][0]
Bình thường [0][0]
Thành viên
Nội dung đánh giá
Code rất tốtCode rất tốt và phù hợp để phát triển
Code rất tốt và phù hợp để phát triển
BẠN HÃY MUA CODE QUA SHARECODE.VN ĐỂ ĐƯỢC BẢO VỆSHARECODE.VN ĐỂ ĐƯỢC BẢO VỆ
NGƯỜI BÁN
In this tutorial, we will be learning how we can draw Pikachu with Python Turtle. We have a series in Python Turtle where we are drawing cartoon characters. We are mainly targetting beginners and intermediate coders. First, we will read the code and read and understand the code.
import turtle def gajurel[x, y]: turtle.setx[x] turtle.sety[y] print[x, y] class Cartoon: def __init__[self]: self.t = turtle.Turtle[] t = self.t t.pensize[3] t.speed[9] t.ondrag[gajurel] def meme[self, x, y]: self.t.penup[] self.t.goto[x, y] self.t.pendown[] def aankha1[self, x, y]: self.meme[x, y] t = self.t t.seth[0] t.fillcolor['#333333'] t.begin_fill[] t.circle[22] t.end_fill[] self.meme[x, y + 10] t.fillcolor['#000000'] t.begin_fill[] t.circle[10] t.end_fill[] self.meme[x + 6, y + 22] t.fillcolor['#ffffff'] t.begin_fill[] t.circle[10] t.end_fill[] def aankha2[self, x, y]: self.meme[x, y] t = self.t t.seth[0] t.fillcolor['#333333'] t.begin_fill[] t.circle[22] t.end_fill[] self.meme[x, y + 10] t.fillcolor['#000000'] t.begin_fill[] t.circle[10] t.end_fill[] self.meme[x - 6, y + 22] t.fillcolor['#ffffff'] t.begin_fill[] t.circle[10] t.end_fill[] def mukh[self, x, y]: self.meme[x, y] t = self.t t.fillcolor['#88141D'] t.begin_fill[] # l1 = [] l2 = [] t.seth[190] a = 0.7 for i in range[28]: a += 0.1 t.right[3] t.fd[a] l1.append[t.position[]] self.meme[x, y] t.seth[10] a = 0.7 for i in range[28]: a += 0.1 t.left[3] t.fd[a] l2.append[t.position[]] # t.seth[10] t.circle[50, 15] t.left[180] t.circle[-50, 15] t.circle[-50, 40] t.seth[233] t.circle[-50, 55] t.left[180] t.circle[50, 12.1] t.end_fill[] # self.meme[17, 54] t.fillcolor['#DD716F'] t.begin_fill[] t.seth[145] t.circle[40, 86] t.penup[] for pos in reversed[l1[:20]]: t.goto[pos[0], pos[1] + 1.5] for pos in l2[:20]: t.goto[pos[0], pos[1] + 1.5] t.pendown[] t.end_fill[] # self.meme[-17, 94] t.seth[8] t.fd[4] t.back[8] # def gaala1[self, x, y]: turtle.tracer[False] t = self.t self.meme[x, y] t.seth[300] t.fillcolor['#DD4D28'] t.begin_fill[] a = 2.3 for i in range[120]: if 0