===== farbiger Turm ===== def simple_tower(xpos,ypos,zpos,breite, hoehe): blocks.fill(YELLOW_CONCRETE,world(xpos,ypos,zpos),world(xpos+breite,ypos+hoehe, zpos+breite)) blocks.fill(ORANGE_CONCRETE, world(xpos,ypos+hoehe,zpos),world(xpos+breite,ypos+2*hoehe, zpos+breite)) blocks.fill(RED_CONCRETE, world(xpos, ypos+2*hoehe, zpos),world(xpos+breite, ypos+3*hoehe, zpos+breite)) blocks.fill(PINK_CONCRETE, world(xpos, ypos+3*hoehe, zpos), world(xpos+breite, ypos+4*hoehe, zpos+breite)) blocks.fill(PURPLE_CONCRETE, world(xpos, ypos+4*hoehe, zpos), world(xpos+breite, ypos+5*hoehe, zpos+breite)) blocks.fill(BLUE_CONCRETE, world(xpos,ypos+5*hoehe,zpos),world(xpos+breite,ypos+6*hoehe, zpos+breite)) blocks.fill(YELLOW_CONCRETE, world(xpos,ypos+6*hoehe,zpos),world(xpos+breite,ypos+7*hoehe, zpos+breite)) blocks.fill(ORANGE_CONCRETE, world(xpos,ypos+7*hoehe,zpos),world(xpos+breite,ypos+8*hoehe, zpos+breite)) blocks.fill(RED_CONCRETE, world(xpos,ypos+8*hoehe,zpos),world(xpos+breite,ypos+9*hoehe, zpos+breite)) blocks.fill(PINK_CONCRETE, world(xpos,ypos+9*hoehe,zpos),world(xpos+breite,ypos+10*hoehe, zpos+breite)) blocks.fill(PURPLE_CONCRETE, world(xpos,ypos+10*hoehe,zpos),world(xpos+breite,ypos+11*hoehe, zpos+breite)) blocks.fill(BLUE_CONCRETE, world(xpos,ypos+11*hoehe,zpos),world(xpos+breite,ypos+12*hoehe, zpos+breite)) blocks.fill(YELLOW_CONCRETE, world(xpos,ypos+12*hoehe,zpos),world(xpos+breite,ypos+13*hoehe, zpos+breite)) blocks.fill(ORANGE_CONCRETE, world(xpos,ypos+13*hoehe,zpos),world(xpos+breite,ypos+14*hoehe, zpos+breite)) blocks.fill(RED_CONCRETE, world(xpos,ypos+14*hoehe,zpos),world(xpos+breite,ypos+15*hoehe, zpos+breite)) blocks.fill(PINK_CONCRETE, world(xpos,ypos+15*hoehe,zpos),world(xpos+breite,ypos+16*hoehe, zpos+breite)) blocks.fill(PURPLE_CONCRETE, world(xpos,ypos+16*hoehe,zpos),world(xpos+breite,ypos+17*hoehe, zpos+breite)) blocks.fill(AIR, world(xpos+1,ypos,zpos+1),world(xpos+breite-1,ypos+hoehe-1, zpos+breite-1)) ===== farbige Wand ===== def simple_wall(xpos,ypos,zpos,breite, hoehe, länge): blocks.fill(YELLOW_CONCRETE,world(xpos,ypos,zpos),world(xpos+breite,ypos+hoehe, zpos+länge)) blocks.fill(ORANGE_CONCRETE, world(xpos,ypos+hoehe,zpos),world(xpos+breite,ypos+2*hoehe, zpos+länge)) blocks.fill(RED_CONCRETE, world(xpos, ypos+2*hoehe, zpos),world(xpos+breite, ypos+3*hoehe, zpos+länge)) blocks.fill(PINK_CONCRETE, world(xpos, ypos+3*hoehe, zpos), world(xpos+breite, ypos+4*hoehe, zpos+länge)) blocks.fill(PURPLE_CONCRETE, world(xpos, ypos+4*hoehe, zpos), world(xpos+breite, ypos+5*hoehe, zpos+länge)) blocks.fill(BLUE_CONCRETE, world(xpos,ypos+5*hoehe,zpos),world(xpos+breite,ypos+6*hoehe, zpos+länge)) blocks.fill(YELLOW_CONCRETE, world(xpos,ypos+6*hoehe,zpos),world(xpos+breite,ypos+7*hoehe, zpos+länge)) blocks.fill(ORANGE_CONCRETE, world(xpos,ypos+7*hoehe,zpos),world(xpos+breite,ypos+8*hoehe, zpos+länge)) blocks.fill(RED_CONCRETE, world(xpos,ypos+8*hoehe,zpos),world(xpos+breite,ypos+9*hoehe, zpos+länge)) blocks.fill(PINK_CONCRETE, world(xpos,ypos+9*hoehe,zpos),world(xpos+breite,ypos+10*hoehe, zpos+länge)) blocks.fill(PURPLE_CONCRETE, world(xpos,ypos+10*hoehe,zpos),world(xpos+breite,ypos+11*hoehe, zpos+länge)) blocks.fill(BLUE_CONCRETE, world(xpos,ypos+11*hoehe,zpos),world(xpos+breite,ypos+12*hoehe, zpos+länge)) ===== das "Schloss" schlussendlich ===== def mauern(): simple_wall(150, 4, 75, 2, 2, 100) simple_wall(150, 4, 75, 100, 2, 2) simple_wall(250, 4, 75, 2, 2, 100) simple_wall(150, 4, 175, 100, 2, 2) def türme(): simple_tower(150, 4, 75, 10, 2) simple_tower(150, 4, 165, 10, 2) simple_tower(240, 4, 165, 10, 2) simple_tower(240, 4, 75, 10, 2) def schloss(): mauern() türme() def simple_wall(xpos,ypos,zpos,breite, hoehe, länge): blocks.fill(YELLOW_CONCRETE,world(xpos,ypos,zpos),world(xpos+breite,ypos+hoehe, zpos+länge)) blocks.fill(ORANGE_CONCRETE, world(xpos,ypos+hoehe,zpos),world(xpos+breite,ypos+2*hoehe, zpos+länge)) blocks.fill(RED_CONCRETE, world(xpos, ypos+2*hoehe, zpos),world(xpos+breite, ypos+3*hoehe, zpos+länge)) blocks.fill(PINK_CONCRETE, world(xpos, ypos+3*hoehe, zpos), world(xpos+breite, ypos+4*hoehe, zpos+länge)) blocks.fill(PURPLE_CONCRETE, world(xpos, ypos+4*hoehe, zpos), world(xpos+breite, ypos+5*hoehe, zpos+länge)) blocks.fill(BLUE_CONCRETE, world(xpos,ypos+5*hoehe,zpos),world(xpos+breite,ypos+6*hoehe, zpos+länge)) blocks.fill(YELLOW_CONCRETE, world(xpos,ypos+6*hoehe,zpos),world(xpos+breite,ypos+7*hoehe, zpos+länge)) blocks.fill(ORANGE_CONCRETE, world(xpos,ypos+7*hoehe,zpos),world(xpos+breite,ypos+8*hoehe, zpos+länge)) blocks.fill(RED_CONCRETE, world(xpos,ypos+8*hoehe,zpos),world(xpos+breite,ypos+9*hoehe, zpos+länge)) blocks.fill(PINK_CONCRETE, world(xpos,ypos+9*hoehe,zpos),world(xpos+breite,ypos+10*hoehe, zpos+länge)) blocks.fill(PURPLE_CONCRETE, world(xpos,ypos+10*hoehe,zpos),world(xpos+breite,ypos+11*hoehe, zpos+länge)) blocks.fill(BLUE_CONCRETE, world(xpos,ypos+11*hoehe,zpos),world(xpos+breite,ypos+12*hoehe, zpos+länge)) def simple_tower(xpos,ypos,zpos,breite, hoehe): blocks.fill(YELLOW_CONCRETE,world(xpos,ypos,zpos),world(xpos+breite,ypos+hoehe, zpos+breite)) blocks.fill(ORANGE_CONCRETE, world(xpos,ypos+hoehe,zpos),world(xpos+breite,ypos+2*hoehe, zpos+breite)) blocks.fill(RED_CONCRETE, world(xpos, ypos+2*hoehe, zpos),world(xpos+breite, ypos+3*hoehe, zpos+breite)) blocks.fill(PINK_CONCRETE, world(xpos, ypos+3*hoehe, zpos), world(xpos+breite, ypos+4*hoehe, zpos+breite)) blocks.fill(PURPLE_CONCRETE, world(xpos, ypos+4*hoehe, zpos), world(xpos+breite, ypos+5*hoehe, zpos+breite)) blocks.fill(BLUE_CONCRETE, world(xpos,ypos+5*hoehe,zpos),world(xpos+breite,ypos+6*hoehe, zpos+breite)) blocks.fill(YELLOW_CONCRETE, world(xpos,ypos+6*hoehe,zpos),world(xpos+breite,ypos+7*hoehe, zpos+breite)) blocks.fill(ORANGE_CONCRETE, world(xpos,ypos+7*hoehe,zpos),world(xpos+breite,ypos+8*hoehe, zpos+breite)) blocks.fill(RED_CONCRETE, world(xpos,ypos+8*hoehe,zpos),world(xpos+breite,ypos+9*hoehe, zpos+breite)) blocks.fill(PINK_CONCRETE, world(xpos,ypos+9*hoehe,zpos),world(xpos+breite,ypos+10*hoehe, zpos+breite)) blocks.fill(PURPLE_CONCRETE, world(xpos,ypos+10*hoehe,zpos),world(xpos+breite,ypos+11*hoehe, zpos+breite)) blocks.fill(BLUE_CONCRETE, world(xpos,ypos+11*hoehe,zpos),world(xpos+breite,ypos+12*hoehe, zpos+breite)) blocks.fill(YELLOW_CONCRETE, world(xpos,ypos+12*hoehe,zpos),world(xpos+breite,ypos+13*hoehe, zpos+breite)) blocks.fill(ORANGE_CONCRETE, world(xpos,ypos+13*hoehe,zpos),world(xpos+breite,ypos+14*hoehe, zpos+breite)) blocks.fill(RED_CONCRETE, world(xpos,ypos+14*hoehe,zpos),world(xpos+breite,ypos+15*hoehe, zpos+breite)) blocks.fill(PINK_CONCRETE, world(xpos,ypos+15*hoehe,zpos),world(xpos+breite,ypos+16*hoehe, zpos+breite)) blocks.fill(PURPLE_CONCRETE, world(xpos,ypos+16*hoehe,zpos),world(xpos+breite,ypos+17*hoehe, zpos+breite)) blocks.fill(AIR, world(xpos+1,ypos,zpos+1),world(xpos+breite-1,ypos+hoehe-1, zpos+breite-1)) def graben(xpos, ypos,zpos,breite, hoehe, laenge): blocks.fill(AIR, world(xpos,ypos,zpos),world(xpos+breite,ypos+hoehe,zpos+laenge)) blocks.fill(GRASS, world(xpos+5,ypos,zpos+5),world(xpos+breite-2,ypos+hoehe,zpos+laenge-2)) def wasser(xpos, ypos, zpos, breite, hoehe, laenge) : blocks.fill(WATER, world(xpos, ypos, zpos), world(xpos+breite, ypos+hoehe, zpos +laenge)) def wassergraben(): graben(1, 1, 73, 100, 2, 100) wasser(1, 1, 73, 5, 2, 100) wasser(1, 1, 73, 100, 2, 5) wasser(1, 1, 172, 100, 2, 5) wasser(101, 1, 73, 5, 2, 104) def mauern(): simple_wall(8, 4, 80, 2, 2, 88) simple_wall(8, 4, 168, 88, 2, 2) simple_wall(96, 4, 168, 2, 2, -88) simple_wall(96, 4, 80, -88, 2, 2) def türme(): simple_tower(8, 4, 80, 10, 2) simple_tower(8, 4, 158, 10, 2) simple_tower(88, 4, 158, 10, 2) simple_tower(88, 4, 80, 10, 2) def schloss(): mauern() türme() schloss() wassergraben() def Baum(xpos, ypos, zpos): for i in range(0,13,1): blocks.place(BROWN_WOOL,world(xpos,ypos+i,zpos)) for p in range(4,13,1): blocks.place(GREEN_WOOL,world(xpos+1,ypos+p,zpos)) blocks.place(GREEN_WOOL,world(xpos-1,ypos+p,zpos)) blocks.place(GREEN_WOOL,world(xpos,ypos+p,zpos+1)) blocks.place(GREEN_WOOL,world(xpos,ypos+p,zpos-1)) for l in range(6,12,1): blocks.place(GREEN_WOOL,world(xpos+2,ypos+l,zpos)) blocks.place(GREEN_WOOL,world(xpos-2,ypos+l,zpos)) blocks.place(GREEN_WOOL,world(xpos,ypos+l,zpos+2)) blocks.place(GREEN_WOOL,world(xpos,ypos+l,zpos-2)) for s in range(6,12,1): blocks.place(GREEN_WOOL,world(xpos+1,ypos+s,zpos+1)) blocks.place(GREEN_WOOL,world(xpos-1,ypos+s,zpos-1)) blocks.place(GREEN_WOOL,world(xpos+1,ypos+s,zpos-1)) blocks.place(GREEN_WOOL,world(xpos-1,ypos+s,zpos+1)) for o in range(12,14,1): blocks.place(GREEN_WOOL,world(xpos,ypos+o,zpos)) def baeume(): for f in range(100,150,10): Baum(f,4,120) Baum(f,4,130) baeume() def strasse(xpos,ypos,zpos,laenge): blocks.fill(BROWN_CONCRETE,world(xpos,ypos,zpos),world(xpos+laenge,ypos,zpos+4)) for i in range(xpos,xpos+laenge,2): blocks.place(CONCRETE,world(i,ypos,zpos+2)) strasse(95,3,123,50)