Skip to content

generate_maze中,136行开始的choose[3]部分,第140行的if wall.type == C.RIGHT 是不是应该修正为C.LEFT #1

Description

@roaminwind

如题,
` if choose[0] or random.random() < randfix:
p = random.randint(x, u)
for wall in arena.cells[get_idx(p, v)].walls:
if wall.type == C.BOTTOM:
wall.kill()

if choose[1] or random.random() < randfix:
    p = random.randint(y, v)
    arena.cells[get_idx(u, p)]
    for wall in arena.cells[get_idx(u, p)].walls:
        if wall.type == C.RIGHT:
            wall.kill()

if choose[2] or random.random() < randfix:
    p = random.randint(u+1, x_)
    arena.cells[get_idx(p, v)]
    for wall in arena.cells[get_idx(p, v)].walls:
        if wall.type == C.BOTTOM:
            wall.kill()

if choose[3] or random.random() < randfix:
    p = random.randint(v+1, y_)
    arena.cells[get_idx(u, p)]
    for wall in arena.cells[get_idx(u, p)].walls:
        if wall.type == C.RIGHT:
            wall.kill()`   

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions