Solid Line & Dotted Line

Using different range() functions, we can easily design different structures such as solid and dotted lines in the CodeCraft game world.

Solid lines that don't start at the origin:

for i in range(3, 8):
    game.set_block(Position(i, 2, -20), 18)

for j in range(6, 15):
    game.set_block(Position(5, j, -20), 18)

for k in range(15, 25):
    game.set_block(Position(0, 4, -k), 18)

Dotted lines:

for i in range(3, 15, 2):
    game.set_block(Position(i, 4, -20), 17)

for j in range(6, 20, 3):
    game.set_block(Position(7, j, -20), 20)

for k in range(15, 25, 2):
    game.set_block(Position(0, 6, -k), 67)

results matching ""

    No results matching ""