fromkandinskyimport*fromtimeimport*# Nuit noire
forxinrange(320):foryinrange(240):set_pixel(x,y,color(0,0,0))# Noir nuit
# Base du château
fill_rect(50,90,220,100,color(169,169,169))# Gris
# Tours
fill_rect(60,50,30,90,color(169,169,169))# Tour gauche
fill_rect(230,50,30,90,color(169,169,169))# Tour droite
# Toits pointus
forxinrange(60,90):foryinrange(30,50):set_pixel(x,y,color(128,0,0))# Toit gauche
set_pixel(x+170,y,color(128,0,0))# Toit droit
foriinrange(15):set_pixel(75-i,35-i,color(128,0,0))# Pointe gauche
set_pixel(235+i,35-i,color(128,0,0))# Pointe droite
# Porte du château (portail ouvert)
forxinrange(140,160):foryinrange(140,190):set_pixel(x,y,color(102,51,0))# Portail marron
forxinrange(160,180):foryinrange(140,190):set_pixel(x,y,color(0,0,0))# Ombre du portail ouvert
# Fenêtres avec barreaux
foriinrange(75,130,30):fill_rect(i,110,10,20,color(0,0,0))# Fenêtres
forjinrange(0,20,5):fill_rect(i+2,110+j,6,1,color(169,169,169))# Barreaux
foriinrange(175,230,30):fill_rect(i,110,10,20,color(0,0,0))# Fenêtres
forjinrange(0,20,5):fill_rect(i+2,110+j,6,1,color(169,169,169))# Barreaux
# Chauve-souris
foriinrange(5):set_pixel(70+i*20,30+(i%2)*10,color(0,0,0))# Chauve-souris
set_pixel(72+i*20,32+(i%2)*10,color(0,0,0))# Chauve-souris
set_pixel(74+i*20,30+(i%2)*10,color(0,0,0))# Chauve-souris
# Arbres gris sans feuilles
foriinrange(30,290,250):fill_rect(i,110,10,40,color(105,105,105))# Tronc gris
fill_rect(i-5,100,20,10,color(169,169,169))# Branches grises
# Chemin
forxinrange(140,180,2):foryinrange(180,240,2):set_pixel(x,y,color(139,69,19))# Chemin marron
# Lumières du château
set_pixel(160,180,color(255,255,255))# Lumière blanche
During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:
Ensure the proper functioning of the site (essential cookies); and
Track your browsing to send you personalized communications if you have created a professional account on the site and can be contacted (audience measurement cookies).
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.