pok_c.py

Created by pikube

Created on December 12, 2019

1.05 KB

ATTENTION: Ce programme exige toute la mémoire de la calculatrice, et est couplé aux autres scripts commençeant par pok_ (f,s,m, et a). Il requiert OMEGA 1.16.0-0 (allez voir https://github.com/Omega-Numworks/Omega).

Ce script contient le dessin du bonnet de noël et de la pokéball


from kandinsky import *
def fill(a,b,c,d,e):
  fill_rect(a,b,c,d,e)
def chapeau(x0,y0,c):
  x=x0
  c1=[50,230,50]
  if x0>160:
    x+=27
    c1=[255,0,0]
  whit=[200,200,200]
  if c==[0,0,0]:
    c1=c
    whit=[0,0,0]
  if c==[255,255,255]:
    c1=[220,220,220]
  c=c1
  y=y0
  fill(x,y,34,5,whit),fill_rect(x+4,y-10,27,10,c),fill_rect(x+9,y-15,20,15,c),fill_rect(x+13,y-18,15,18,c),fill_rect(x+19,y-21,8,21,c),fill_rect(x+21,y-25,5,5,whit)
def draw_pokeball():
  x,y=100,-1
  #black parts
  fill(x,y+4*9,13*9,5*9,(0,0,0))
  fill(x+9,y+3*9,11*9,7*9,(0,0,0))
  fill(x+18,y+18,9*9,9*9,(0,0,0))
  fill(x+27,y+9,7*9,11*9,(0,0,0))
  fill(x+36,y,9*5,13*9,(0,0,0))
  #red parts
  fill(x+36,y+9,9*5,5*9,(255,0,0))
  fill(x+27,y+18,7*9,4*9,(255,0,0))
  fill(x+18,y+27,9*9,3*9,(255,0,0))
  fill(x+9,y+45,11*9,9,(255,0,0))
  #white parts
  fill(x+9,y+63,11*9,9,(255,255,255))
  fill(x+18,y+72,9*9,18,(255,255,255))
  fill(x+27,y+90,7*9,9,(255,255,255))
  fill(x+36,y+99,5*9,9,(255,255,255))
  #button
  fill(x+45,y+9*5,3*9,3*9,(0,0,0))
  fill(x+54,y+9*6,9,9,(255,255,255))

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.