cube_clicker.py

Created by johnnyboulayq

Created on October 20, 2024

4.13 KB

A few Patch


from kandinsky import *
from time import *
from ion import *
import random


X = 150
Y = 100
XC = random.randint(1,290)
YC = random.randint(1,190)

CLICKS = 0
CANCLICK = 1

print("_____________________________")
print("         Cube Clicker")
print("       By Johnny BOULAY")
print("      (JohnnyBoulayBoy)")
print("_____________________________")
print("     Please, report bug      ")
print("")
print("")
print("")
print("")
print("")
print("")
sleep(2)
fill_rect(0, 0, 325, 255, 'gray')
sleep(0.05)
fill_rect(0, 0, 325, 255, 'black')

# Dessin des lettres
fill_rect(20, 20, 80, 20, 'yellow')
fill_rect(20, 20, 20, 80, 'yellow')
fill_rect(20, 100, 80, 20, 'yellow')  # C

fill_rect(100, 20, 20, 80, 'green')
fill_rect(100, 100, 80, 20, 'green')
fill_rect(160, 20, 20, 80, 'green')  # U

fill_rect(180, 20, 20, 80, 'orange')
fill_rect(180, 100, 60, 20, 'orange')
fill_rect(220, 120, 20, -40, 'orange')
fill_rect(200, 60, 40, 20, 'orange')  # B

fill_rect(240, 20, 20, 100, 'red')
fill_rect(240, 20, 60, 20, 'red')
fill_rect(240, 100, 60, 20, 'red')
fill_rect(240, 60, 50, 20, 'red')  # E

draw_string("Clicker", 130, 120)
draw_string("[OK] - Start",100,150)
draw_string("By Johnny BOULAY", 0, 205)

while not keydown(KEY_OK):
    if keydown(KEY_UP) and keydown(KEY_DOWN) and keydown(KEY_LEFT) and keydown(KEY_RIGHT):
        draw_string("What are you doing ?", 70, 0, color(127,0,0))
pass

fill_rect(0, 0, 325, 255, 'black')
sleep(0.05)
fill_rect(0, 0, 325, 255, 'gray')
sleep(0.05)
fill_rect(0, 0, 325, 255, 'white')
draw_string("[OK] - +1 Click", 0, 0)

SHOP = 0
CANCLICK = 1
MODE = 1
while True:
  if MODE == 1:
    fill_rect(0, 0, 325, 255, color(50,50,100))
  if MODE == 2:
    fill_rect(0, 0, 325, 255, color(100,0,100))
  if MODE == 3:
    fill_rect(0,0,325,255, 'brown')
  
  if SHOP == 0:
    if MODE == 1:
      fill_rect(120, 77, 60, 60, 'blue')

      if keydown(KEY_OK) and not CANCLICK == 1:
        CLICKS += 1
          
      if keydown(KEY_EXE):
        SHOP = 1

      if keydown(KEY_OK):
        CANCLICK = 1
      else:
        CANCLICK = 0

        # Afficher le nombre de clics au centre
      draw_string("Clicks: ",0,0)
      draw_string("GameMode - [EXE]",0,205)
      draw_string(str(CLICKS), 80 - (len(str(CLICKS)) * 3), 0, 'black')
      sleep(0.01)
    
    elif MODE == 2:
      fill_rect(120, 77, 60, 60, 'orange')

      if keydown(KEY_OK) and not CANCLICK == 1:
        CLICKS += 2
          
      if keydown(KEY_EXE):
        SHOP = 1

      if keydown(KEY_OK):
        CANCLICK = 1
      else:
        CANCLICK = 0
      
      draw_string("Clicks: ",0,0)
      draw_string(str(CLICKS), 80 - (len(str(CLICKS)) * 3), 0, 'black')
      draw_string("GameMode - [EXE]",0,205)
      sleep(0.01)
    elif MODE == 3:
      fill_rect(XC, YC, 20, 20, 'gray')  # Cube gris de 20x20
      fill_rect(X, Y, 10, 10, 'white')    # Cube blanc de 10x10
    
      if keydown(KEY_DOWN) and not Y > 209:
          Y += 2
      if keydown(KEY_UP) and not Y < 1:
          Y -= 2
      if keydown(KEY_LEFT) and not X < 1:
          X -= 2
      if keydown(KEY_RIGHT) and not X > 309:
          X += 2
    
      if X < XC + 20 and X + 10 > XC and Y < YC + 20 and Y + 10 > YC:
          CLICKS += 1
          XC = random.randint(1, 290)
          YC = random.randint(1, 190)
    
      if keydown(KEY_EXE):
          SHOP = 1

      draw_string("catch: ", 0, 0)
      draw_string(str(CLICKS), 70 - (len(str(CLICKS)) * 3), 0, 'black')
      draw_string("GameMode - [EXE]", 0, 205)  
      sleep(0.01)

  else:
    draw_string("Clicks: ",0,0)
    draw_string("Back - [Ans]",0,205)
    draw_string(str(CLICKS), 80 - (len(str(CLICKS)) * 3), 0, 'black')
    draw_string("Classic - [1]",20,30)
    draw_string("x2 - [2]",20,60)
    draw_string("Moving Cube - [3]",20,90)
    draw_string("Coming Soon...",20,120)
    
    if keydown(KEY_ANS):
      SHOP = 0
    
    if keydown(KEY_ONE):
      CLICKS = 0
      SHOP = 0
      MODE = 1
      
    if keydown(KEY_TWO):
      CLICKS = 0
      SHOP = 0
      MODE = 2
      
    if keydown(KEY_THREE):
      CLICKS = 0
      SHOP = 0
      MODE = 3
      X = 150
      Y = 100
      XC = random.randint(1,290)
      YC = random.randint(1,190)

    sleep(0.01)

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.