MaundyMoo / PythonGameV2

A second project in python after I abandoned the first one
The Unlicense
0 stars 0 forks source link

Caverns not joining correctly #7

Closed MaundyMoo closed 5 years ago

MaundyMoo commented 5 years ago

After adding the tile that restarts the level, there have been cases of caverns not joining as they should, whether this issue has been present for a while or not I don't know

MaundyMoo commented 5 years ago

image

Example issue

MaundyMoo commented 5 years ago

Should be fixed, changed

    if y1 < y2:
        for i in range(y1, y2+1):
            map[i][x2] = 'c'
    elif x1 > x2:
        for i in range(y2, y1+1):
            map[i][x2] = 'd'

to

    if y1 < y2:
        for i in range(y1, y2+1):
            map[i][x2] = 'c'
    elif y1 > y2:
        for i in range(y2, y1+1):
            map[i][x2] = 'd'