from kandinsky import * from time import * # Nuit noire for x in range(320): for y in range(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 for x in range(60, 90): for y in range(30, 50): set_pixel(x, y, color(128, 0, 0)) # Toit gauche set_pixel(x + 170, y, color(128, 0, 0)) # Toit droit for i in range(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) for x in range(140, 160): for y in range(140, 190): set_pixel(x, y, color(102, 51, 0)) # Portail marron for x in range(160, 180): for y in range(140, 190): set_pixel(x, y, color(0, 0, 0)) # Ombre du portail ouvert # Fenêtres avec barreaux for i in range(75, 130, 30): fill_rect(i, 110, 10, 20, color(0, 0, 0)) # Fenêtres for j in range(0, 20, 5): fill_rect(i+2, 110+j, 6, 1, color(169, 169, 169)) # Barreaux for i in range(175, 230, 30): fill_rect(i, 110, 10, 20, color(0, 0, 0)) # Fenêtres for j in range(0, 20, 5): fill_rect(i+2, 110+j, 6, 1, color(169, 169, 169)) # Barreaux # Chauve-souris for i in range(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 for i in range(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 for x in range(140, 180, 2): for y in range(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