I Created Game in MS Paint!

Sdílet
Vložit

Komentáře • 11

  • @PracticalCoding.
    @PracticalCoding.  Před měsícem +2

    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])

  • @angpang1637
    @angpang1637 Před měsícem +4

    The only ones are tic tac toe

  • @littleharry7977
    @littleharry7977 Před měsícem

    This is the best paint game I’ve seen ever

  • @ID-iken
    @ID-iken Před měsícem

    the BEST

  • @DazaiUchiha101
    @DazaiUchiha101 Před měsícem

    bro u editing is fire

  • @Gnume47
    @Gnume47 Před měsícem

    dobry odcinek

  • @b213videoz
    @b213videoz Před 22 dny +1

    Clickbait! You didn't create a game in Paint alone, you have some code.
    Dislike.