Velikost videa: 1280 X 720853 X 480640 X 360
Zobrazit ovladače přehrávání
Automatické přehrávání
Přehrát
Code:import pyautogui as pgimport time, keyboard, random, syswidth = 1100height = 700xpos = 450ypos = 240margin = 1game_points = 0def round_list(lista): rounded_list = [] for x, y in lista: round_x = round(x, -1) round_y = round(y, -1) rounded_list.append((round_x, round_y)) return rounded_listdef round_point(point): return tuple(round(value, -1) for value in point)def move(X, Y): if keyboard.is_pressed('s'): pg.click(X, Y, button='right') Y += 7 pg.click(X, Y) if keyboard.is_pressed('w'): pg.click(X, Y, button='right') Y -= 7 pg.click(X, Y) if keyboard.is_pressed('d'): pg.click(X, Y, button='right') X += 7 pg.click(X, Y) if keyboard.is_pressed('a'): pg.click(X, Y, button='right') X -= 7 pg.click(X, Y)def generate(x, y, multiply, margin): global points points = [] for i in range(multiply): point_x = random.randint(x, 1550) point_y = random.randint(y, 900) pg.click(point_x, point_y) for i in range(margin): point_1m = (point_x-i, point_y+i) point_2m = (point_x+i, point_y-i) points.append(point_1m) points.append(point_2m) i += 1 print(points)#generate(xpos, ypos, 10, margin)##pg.hotkey('win', 'r')#pg.write('mspaint')#pg.press('enter')time.sleep(3)pg.moveTo(xpos, ypos)pg.click()pg.dragRel(width, 0)pg.dragRel(0, height)pg.dragRel(-width, 0)pg.dragRel(0, -height)pg.mouseUp()time.sleep(1)generate(xpos, ypos, 100, margin)print(round_list(points))pg.moveTo(960, 61)pg.click()time.sleep(1)pg.click(1008, 585)#print(pg.position())while not keyboard.is_pressed('q'): x, y = pg.position() move(x, y) coords = x, y #print(coords) #print(round_list(points)) #print(coords) rounded_coords = round_point(coords) tolerance = 5 for point in points.copy(): if abs(point[0] - rounded_coords[0])
The only ones are tic tac toe
This is the best paint game I’ve seen ever
bro there are not many paint games maybe that's why
the BEST
it can be better with AI (new video today)
bro u editing is fire
bro 2 minutes of editing takes me 5 hours
dobry odcinek
dzięki
Clickbait! You didn't create a game in Paint alone, you have some code.Dislike.
Code:
import pyautogui as pg
import time, keyboard, random, sys
width = 1100
height = 700
xpos = 450
ypos = 240
margin = 1
game_points = 0
def round_list(lista):
rounded_list = []
for x, y in lista:
round_x = round(x, -1)
round_y = round(y, -1)
rounded_list.append((round_x, round_y))
return rounded_list
def round_point(point):
return tuple(round(value, -1) for value in point)
def move(X, Y):
if keyboard.is_pressed('s'):
pg.click(X, Y, button='right')
Y += 7
pg.click(X, Y)
if keyboard.is_pressed('w'):
pg.click(X, Y, button='right')
Y -= 7
pg.click(X, Y)
if keyboard.is_pressed('d'):
pg.click(X, Y, button='right')
X += 7
pg.click(X, Y)
if keyboard.is_pressed('a'):
pg.click(X, Y, button='right')
X -= 7
pg.click(X, Y)
def generate(x, y, multiply, margin):
global points
points = []
for i in range(multiply):
point_x = random.randint(x, 1550)
point_y = random.randint(y, 900)
pg.click(point_x, point_y)
for i in range(margin):
point_1m = (point_x-i, point_y+i)
point_2m = (point_x+i, point_y-i)
points.append(point_1m)
points.append(point_2m)
i += 1
print(points)
#generate(xpos, ypos, 10, margin)
#
#pg.hotkey('win', 'r')
#pg.write('mspaint')
#pg.press('enter')
time.sleep(3)
pg.moveTo(xpos, ypos)
pg.click()
pg.dragRel(width, 0)
pg.dragRel(0, height)
pg.dragRel(-width, 0)
pg.dragRel(0, -height)
pg.mouseUp()
time.sleep(1)
generate(xpos, ypos, 100, margin)
print(round_list(points))
pg.moveTo(960, 61)
pg.click()
time.sleep(1)
pg.click(1008, 585)
#print(pg.position())
while not keyboard.is_pressed('q'):
x, y = pg.position()
move(x, y)
coords = x, y
#print(coords)
#print(round_list(points))
#print(coords)
rounded_coords = round_point(coords)
tolerance = 5
for point in points.copy():
if abs(point[0] - rounded_coords[0])
The only ones are tic tac toe
This is the best paint game I’ve seen ever
bro there are not many paint games maybe that's why
the BEST
it can be better with AI (new video today)
bro u editing is fire
bro 2 minutes of editing takes me 5 hours
dobry odcinek
dzięki
Clickbait! You didn't create a game in Paint alone, you have some code.
Dislike.