Inhaltsverzeichnis

Gruppe 1

Projektidee:

Fussballstadion (Inspiration vom Old Trafford Stadion)

Gesamtgrösse: 40×70 in flacher, leeren Welt

Material:

Elemente

Davon weggelassen:

Diese Elemente wurden aufgrund von Zeitmangel weggelassen, weil andere Elemente wie das Tor und der bewegende Ball mehr Zeit in Anspruch nahmen als wir anfangs dachten

Hinzugefügt:

Zu erledigen:

Skizze des Fussballplatzes(zur Vorstellung), Material für die jeweiligen Elemente festlegen, Einzelne Elemente programmieren(in kleinen Schritten) –>Elemente sind: Fussballplatz, Tribüne, Dach, Schriftzug, Ball, Spieler, Tore, Lichter Programmcode kommentieren/erklären, Dokumentation auf dem Wiki aktualisieren, Planung auf dem Scrumboard erweitern

Python Code

Fussballfeld (Boden und Tribüne)

position = (-957, -60, 1341)
radius = 12
 
def feed(x,y,z):
    blocks.fill(AIR, world(x-1, y, z), world(x+60, y+20, z+100),FillOperation.REPLACE)
    blocks.fill(GREEN_CARPET, world(x, y, z), world(x+40, y, z+70),FillOperation.REPLACE) #Grünes Fussballfeld wird gebaut
    blocks.fill(ICE, world(x+3, y-3, z), world(x+37, y-1, z+66), FillOperation.REPLACE) #Eis wird unter das Fussballfeld platziert
    for i in range(radius):
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 1), world(x, y, z), world(x, y, z+70),FillOperation.REPLACE) #Tribüne wird gebaut 
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 2), world(x, y, z+70), world(x+40, y, z+70),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 0), world(x+40, y, z+70), world(x+40, y, z),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 3), world(x+40, y, z), world(x, y, z),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 1), world(x-i, y+i, z-i), world(x-i, y+i, z+70+i),FillOperation.REPLACE) #Weite der Tribüne wird definiert
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 2), world(x-i, y+i, z+70+i), world(x+40+i, y+i, z+70+i),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 0), world(x+40+i, y+i, z+70+i), world(x+40+i, y+i, z-i),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 3), world(x+40+i, y+i, z-i), world(x-i, y+i, z-i),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 1), world(x-i, y+i, z-i), world(x-i, y+i, z+70+i),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 2), world(x-i, y+i, z+70+i), world(x+40+i, y+i, z+70+i),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 0), world(x+40+i, y+i, z+70+i), world(x+40+i, y+i, z-i),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 3), world(x+40+i, y+i, z-i), world(x-i, y+i, z-i),FillOperation.REPLACE)

Villiger auf dem Feld

def mobspawn(x,y,z):
    for i in range(100):
        mobs.spawn(VILLAGER, world(x+0, y, z+0)), world(x+100, y, Z+1)
    for i in range(100):
        mobs.spawn(VILLAGER, world(x, y, z+50)), world(x+100, y, Z+1)
    for i in range(100):
        mobs.spawn(VILLAGER, world(x, y, z+100)), world(x+100, y, Z+1)
    for i in range (1):
        mobs.spawn(ARMADILLO, world(x+25, y, z+15))
 

Stadiondach

position = (-957, -60, 1341) #Selber Koordinaten eingeben
radius = 12
def stadiondach(x, y, z, length, width, height, material): #stadiondach ort wird definiert
    for i in range(radius):
        y_now = y - int(height / radius * i)
        blocks.fill(material, world(x + i, y_now, z + i), world(x + length - i - 1, y_now, z + width - i - 1), FillOperation.REPLACE)
        blocks.fill(AIR, world(x + i + 1, y_now, z + i + 1), world(x + length - i - 2, y_now, z + width - i - 2), FillOperation.REPLACE)
 
    return 1

Schrift vor dem Stadion

blocks.print("Manchester United", REDSTONE_BLOCK, world(x, y, z),0)

Lichter im Stadion

blocks.fill(SHROOMLIGHT, world(x-4, y+9, z-3), world(x+45, y+9, z-5), FillOperation.REPLACE)  # Hinten, 2 Blöcke höher
blocks.fill(SHROOMLIGHT, world(x-4, y+9, z+73), world(x+45, y+9, z+71), FillOperation.REPLACE) # Vorne, 2 Blöcke höher
 
blocks.fill(SHROOMLIGHT, world(x-4, y+9, z-3), world(x-5, y+9, z+71), FillOperation.REPLACE)   # Links, längere Beleuchtung
blocks.fill(SHROOMLIGHT, world(x+45, y+9, z-3), world(x+45, y+9, z+71), FillOperation.REPLACE) # Rechts, längere Beleuchtung

Zaun

    blocks.fill(OAK_FENCE, world(x+2, y, z+3), world(x+2, y, z+67), FillOperation.REPLACE)  # Rechts
    blocks.fill(OAK_FENCE, world(x+38, y, z+3), world(x+38, y, z+67), FillOperation.REPLACE) # Links
    blocks.fill(OAK_FENCE, world(x+3, y, z+2), world(x+37, y, z+2), FillOperation.REPLACE)   # Hinten
    blocks.fill(OAK_FENCE, world(x+3, y, z+68), world(x+37, y, z+68), FillOperation.REPLACE)
 
    Eckzäune 
    blocks.place(OAK_FENCE, world(x+2, y, z+2))    # Hinten rechts
    blocks.place(OAK_FENCE, world(x+2, y, z+68))   # Vorne rechts
    blocks.place(OAK_FENCE, world(x+38, y, z+2))   # Hinten links
    blocks.place(OAK_FENCE, world(x+38, y, z+68))  # Vorne links

Fussball

for i in range (1):
        mobs.spawn(ARMADILLO, world(x+25, y, z+15))
 
 
 

Fussballplatz (Boden)

def platz(x,y,z):
    blocks.fill(WHITE_CARPET, world(x+3, y, z+3), world(x+37, y, z+3),FillOperation.REPLACE)#Streifen Auf Feld
    blocks.fill(WHITE_CARPET, world(x+3, y, z+3), world(x+3, y, z+67),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+37, y, z+3), world(x+37, y, z+67),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+37, y, z+67), world(x+3, y, z+67),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+16, y, z+7), world(x+24, y, z+7),FillOperation.REPLACE)#Rechts Goal streifen
    blocks.fill(WHITE_CARPET, world(x+16, y, z+7), world(x+16, y, z+4),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+24, y, z+7), world(x+24, y, z+4),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+24, y, z+63), world(x+24, y, z+66),FillOperation.REPLACE)#links Goal streifen
    blocks.fill(WHITE_CARPET, world(x+16, y, z+63), world(x+16, y, z+66),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+16, y, z+63), world(x+24, y, z+63),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+3, y, z+35), world(x+37, y, z+35),FillOperation.REPLACE)#Mittlerer Streifen
    blocks.fill(WHITE_CARPET, world(x+20, y, z+33), world(x+21, y, z+33),FillOperation.REPLACE)#kreis in der Mitte
    blocks.fill(WHITE_CARPET, world(x+19, y, z+34), world(x+19, y, z+34),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+22, y, z+34), world(x+22, y, z+34),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+19, y, z+36), world(x+19, y, z+35),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+22, y, z+36), world(x+22, y, z+36),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+20, y, z+37), world(x+21, y, z+37),FillOperation.REPLACE)
    blocks.fill(AIR, world(x, y, z+35), world(x-2, y+1, z+36),FillOperation.REPLACE) #Türen werden gebaut
    blocks.fill(BIRCH_DOOR, world(x-1, y, z+35), world(x-1, y+1, z+36),FillOperation.REPLACE)
    blocks.fill(AIR, world(x+40, y, z+35), world(x+42, y+1, z+36),FillOperation.REPLACE)
    blocks.fill(BIRCH_DOOR, world(x+42, y, z+35), world(x+42, y+1, z+36),FillOperation.REPLACE)
    blocks.fill(WHITE_CONCRETE, world(x+16, y, z+4), world(x+16, y+4, z+4),FillOperation.REPLACE) #Tor Rechts
    blocks.fill(WHITE_CONCRETE, world(x+24, y, z+4), world(x+24, y+4, z+4),FillOperation.REPLACE)
    blocks.fill(WHITE_CONCRETE, world(x+16, y+4, z+4), world(x+24, y+4, z+4),FillOperation.REPLACE)
    blocks.fill(COBWEB, world(x+17, y, z+4), world(x+23, y+3, z+4),FillOperation.REPLACE)
    blocks.fill(WHITE_CONCRETE, world(x+24, y, z+66), world(x+24, y+4, z+66),FillOperation.REPLACE) #tor links
    blocks.fill(WHITE_CONCRETE, world(x+16, y, z+66), world(x+16, y+4, z+66),FillOperation.REPLACE)
    blocks.fill(WHITE_CONCRETE, world(x+16, y+4, z+66), world(x+24, y+4, z+66),FillOperation.REPLACE)
    blocks.fill(COBWEB, world(x+17, y, z+66), world(x+23, y+3, z+66),FillOperation.REPLACE)
    blocks.fill(OAK_FENCE, world(x+2, y, z+3), world(x+2, y, z+67), FillOperation.REPLACE)  # Rechts
    blocks.fill(OAK_FENCE, world(x+38, y, z+3), world(x+38, y, z+67), FillOperation.REPLACE) # Links
    blocks.fill(OAK_FENCE, world(x+3, y, z+2), world(x+37, y, z+2), FillOperation.REPLACE)   # Hinten
    blocks.fill(OAK_FENCE, world(x+3, y, z+68), world(x+37, y, z+68), FillOperation.REPLACE) # Vorne
    blocks.fill(SHROOMLIGHT, world(x-4, y+9, z-3), world(x+45, y+9, z-5), FillOperation.REPLACE)  # Hinten, 2 Blöcke höher
    blocks.fill(SHROOMLIGHT, world(x-4, y+9, z+73), world(x+45, y+9, z+71), FillOperation.REPLACE) # Vorne, 2 Blöcke höher
    blocks.fill(SHROOMLIGHT, world(x-4, y+9, z-3), world(x-5, y+9, z+71), FillOperation.REPLACE)   # Links, längere Beleuchtung
    blocks.fill(SHROOMLIGHT, world(x+45, y+9, z-3), world(x+45, y+9, z+71), FillOperation.REPLACE) # Rechts, längere Beleuchtung
 
    # Eckzäune (4 Ecken extra absichern)
    blocks.place(OAK_FENCE, world(x+2, y, z+2))    # Hinten rechts
    blocks.place(OAK_FENCE, world(x+2, y, z+68))   # Vorne rechts
    blocks.place(OAK_FENCE, world(x+38, y, z+2))   # Hinten links
    blocks.place(OAK_FENCE, world(x+38, y, z+68))  # Vorne links

Fertiger Code

position = (-957, -60, 1341) #Selber Koordinaten eingeben
radius = 12
 
def feed(x,y,z):
    blocks.fill(AIR, world(x-1, y, z), world(x+60, y+20, z+100),FillOperation.REPLACE)
    blocks.fill(GREEN_CARPET, world(x, y, z), world(x+40, y, z+70),FillOperation.REPLACE) #Grünes Fussballfeld wird gebaut
    blocks.fill(ICE, world(x+3, y-3, z), world(x+37, y-1, z+66), FillOperation.REPLACE) #Eis wird unter Fussballfeld gebaut
    for i in range(radius):
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 1), world(x, y, z), world(x, y, z+70),FillOperation.REPLACE) #Tribüne wird gebaut 
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 2), world(x, y, z+70), world(x+40, y, z+70),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 0), world(x+40, y, z+70), world(x+40, y, z),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 3), world(x+40, y, z), world(x, y, z),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 1), world(x-i, y+i, z-i), world(x-i, y+i, z+70+i),FillOperation.REPLACE) #weite der Tribüne wird definiert
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 2), world(x-i, y+i, z+70+i), world(x+40+i, y+i, z+70+i),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 0), world(x+40+i, y+i, z+70+i), world(x+40+i, y+i, z-i),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 3), world(x+40+i, y+i, z-i), world(x-i, y+i, z-i),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 1), world(x-i, y+i, z-i), world(x-i, y+i, z+70+i),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 2), world(x-i, y+i, z+70+i), world(x+40+i, y+i, z+70+i),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 0), world(x+40+i, y+i, z+70+i), world(x+40+i, y+i, z-i),FillOperation.REPLACE)
        blocks.fill(blocks.block_with_data(BRICK_STAIRS, 3), world(x+40+i, y+i, z-i), world(x-i, y+i, z-i),FillOperation.REPLACE)
 
def platz(x,y,z):
    blocks.fill(WHITE_CARPET, world(x+3, y, z+3), world(x+37, y, z+3),FillOperation.REPLACE)#Streifen Auf Feld
    blocks.fill(WHITE_CARPET, world(x+3, y, z+3), world(x+3, y, z+67),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+37, y, z+3), world(x+37, y, z+67),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+37, y, z+67), world(x+3, y, z+67),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+16, y, z+7), world(x+24, y, z+7),FillOperation.REPLACE)#Rechts Goal streifen
    blocks.fill(WHITE_CARPET, world(x+16, y, z+7), world(x+16, y, z+4),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+24, y, z+7), world(x+24, y, z+4),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+24, y, z+63), world(x+24, y, z+66),FillOperation.REPLACE)#links Goal streifen
    blocks.fill(WHITE_CARPET, world(x+16, y, z+63), world(x+16, y, z+66),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+16, y, z+63), world(x+24, y, z+63),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+3, y, z+35), world(x+37, y, z+35),FillOperation.REPLACE)#Mittlerer Streifen
    blocks.fill(WHITE_CARPET, world(x+20, y, z+33), world(x+21, y, z+33),FillOperation.REPLACE)#kreis in der Mitte
    blocks.fill(WHITE_CARPET, world(x+19, y, z+34), world(x+19, y, z+34),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+22, y, z+34), world(x+22, y, z+34),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+19, y, z+36), world(x+19, y, z+35),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+22, y, z+36), world(x+22, y, z+36),FillOperation.REPLACE)
    blocks.fill(WHITE_CARPET, world(x+20, y, z+37), world(x+21, y, z+37),FillOperation.REPLACE)
    blocks.fill(AIR, world(x, y, z+35), world(x-2, y+1, z+36),FillOperation.REPLACE) #Türen werden gebaut
    blocks.fill(BIRCH_DOOR, world(x-1, y, z+35), world(x-1, y+1, z+36),FillOperation.REPLACE)
    blocks.fill(AIR, world(x+40, y, z+35), world(x+42, y+1, z+36),FillOperation.REPLACE)
    blocks.fill(BIRCH_DOOR, world(x+42, y, z+35), world(x+42, y+1, z+36),FillOperation.REPLACE)
    blocks.fill(WHITE_CONCRETE, world(x+16, y, z+4), world(x+16, y+4, z+4),FillOperation.REPLACE) #Tor Rechts
    blocks.fill(WHITE_CONCRETE, world(x+24, y, z+4), world(x+24, y+4, z+4),FillOperation.REPLACE)
    blocks.fill(WHITE_CONCRETE, world(x+16, y+4, z+4), world(x+24, y+4, z+4),FillOperation.REPLACE)
    blocks.fill(COBWEB, world(x+17, y, z+4), world(x+23, y+3, z+4),FillOperation.REPLACE)
    blocks.fill(WHITE_CONCRETE, world(x+24, y, z+66), world(x+24, y+4, z+66),FillOperation.REPLACE) #Tor links
    blocks.fill(WHITE_CONCRETE, world(x+16, y, z+66), world(x+16, y+4, z+66),FillOperation.REPLACE)
    blocks.fill(WHITE_CONCRETE, world(x+16, y+4, z+66), world(x+24, y+4, z+66),FillOperation.REPLACE)
    blocks.fill(COBWEB, world(x+17, y, z+66), world(x+23, y+3, z+66),FillOperation.REPLACE)
    blocks.fill(OAK_FENCE, world(x+2, y, z+3), world(x+2, y, z+67), FillOperation.REPLACE)  # Rechts Zäune werden gebaut
    blocks.fill(OAK_FENCE, world(x+38, y, z+3), world(x+38, y, z+67), FillOperation.REPLACE) # Links
    blocks.fill(OAK_FENCE, world(x+3, y, z+2), world(x+37, y, z+2), FillOperation.REPLACE)   # Hinten
    blocks.fill(OAK_FENCE, world(x+3, y, z+68), world(x+37, y, z+68), FillOperation.REPLACE) # Vorne
    blocks.fill(SHROOMLIGHT, world(x-4, y+9, z-3), world(x+45, y+9, z-5), FillOperation.REPLACE)  # Hinten, 2 Blöcke höher
    blocks.fill(SHROOMLIGHT, world(x-4, y+9, z+73), world(x+45, y+9, z+71), FillOperation.REPLACE) # Vorne, 2 Blöcke höher
    blocks.fill(SHROOMLIGHT, world(x-4, y+9, z-3), world(x-5, y+9, z+71), FillOperation.REPLACE)   # Links, längere Beleuchtung
    blocks.fill(SHROOMLIGHT, world(x+45, y+9, z-3), world(x+45, y+9, z+71), FillOperation.REPLACE) # Rechts, längere Beleuchtung
    blocks.place(OAK_FENCE, world(x+2, y, z+2))    # # Eckzäune (4 Ecken extra absichern) Hinten rechts
    blocks.place(OAK_FENCE, world(x+2, y, z+68))   # Vorne rechts
    blocks.place(OAK_FENCE, world(x+38, y, z+2))   # Hinten links
    blocks.place(OAK_FENCE, world(x+38, y, z+68))  # Vorne links
 
 
def mobspawn(x,y,z):
    for i in range(100):
        mobs.spawn(VILLAGER, world(x+0, y, z+0)), world(x+100, y, Z+1) #Villigar spawned
    for i in range(100):
        mobs.spawn(VILLAGER, world(x, y, z+50)), world(x+100, y, Z+1)
    for i in range(100):
        mobs.spawn(VILLAGER, world(x, y, z+100)), world(x+100, y, Z+1)
    for i in range (1):
        mobs.spawn(ARMADILLO, world(x+25, y, z+15)) #"Fussball wird gespawnt"
def stadiondach(x, y, z, length, width, height, material): #stadiondach ort wird definiert
    for i in range(radius):
        y_now = y - int(height / radius * i)
        blocks.fill(material, world(x + i, y_now, z + i), world(x + length - i - 1, y_now, z + width - i - 1), FillOperation.REPLACE)
        blocks.fill(AIR, world(x + i + 1, y_now, z + i + 1), world(x + length - i - 2, y_now, z + width - i - 2), FillOperation.REPLACE)
 
    return 1
stadiondach(position[0] - radius, position[1] + radius, position[2] - radius, 40 + 2 * radius, 70 + 2 * radius, 3, 236)
feed(position[0], position[1], position[2])
platz(position[0], position[1], position[2])
mobspawn(position[0], position[1], position[2])

Fazit

Idee: Im Nachhinein denken wir, dass uns die Arbeit einfacher gefallen wäre, wenn wir ein anderes Element als ein Fussballstadion gewählt hätten. Beispielsweise wenn wir ein Dorf gemacht hätten, hätten wir mit weniger Komplexität verschiedene Häuser bauen können da wir die Grundstruktur eines Codes für ein Haus hätten beibehalten können und nur leichte Veränderungen hätten vornehmen können und so trotzdem ein Vielfältiges Endprodukt erhalten. Zudem hätten wir als erstes prüfen können, wie wir die einzelnen Elemente umsetzen können. Da wir beim Tor sowie auch beim Ball improvisieren mussten da es kein passendes Element gab. Das Tor haben wir also mit Spinnennetz gebaut und den Ball mit einem Tier das auf Eis rutscht was wiederum für die Interaktion ein Problem für uns darstellte.