Exemplo n.º 1
0
def test_TilePlane_display():
    print("TESTING tp.display()")
    W = 4
    H = 5
    tp = TilePlane.new_from_1D(W,
                               H, [str(i % W) for i in range(W * H)],
                               default='.')
    tp.display()
    print()
Exemplo n.º 2
0
def test_TilePlane_fill():
    print("TESTING tp.fill()")
    print("BEFORE:")
    w, h = 6, 6
    main_plane = TilePlane.new_from_1D(
        w, h, ["abcdefghijklmnopqrstuvwxyz"[i % 26] for i in range(w * h)])
    main_plane.display()
    print()
    print("AFTER:")
    main_plane.fill('&')
    main_plane.display()
    print()
Exemplo n.º 3
0
def test_TilePlane_subplane():
    print("TESTING tp.subplane()")
    print("MAIN:")
    w, h = 20, 10
    main_plane = TilePlane.new_from_1D(
        w, h, ["abcdefghijklmnopqrstuvwxyz"[i % 26] for i in range(w * h)])
    main_plane.display()
    print()
    print("SUB:")
    sub = main_plane.subplane(2, 2, 4, 4)
    sub.display()
    print()