I would like this code to be changed so that whenever I change the line the line will still be a wall...
slin1_1 = 320
slin1_2 = 0
elin1_1 = 320
elin1_2 = 200
strtlin1 = (slin1_1, slin1_2)
endlin1 = (elin1_1, elin1_2)
lin1sz = 1
#creates first line above ^
slin2_1 = 320
slin2_2 = 400
elin2_1 = 320
elin2_2 = 300
strtlin2 = (slin2_1, slin2_2)
endlin2 = (elin2_1, elin2_2)
lin2sz = 1
#creates second line above
if x <= 0 or x >= width or y <= 0 or y >= height:
print( "Crash!!!" )
running = False
a += 1
for i in range(0, 49):
if x + i == slin1_1 and (y <=200 or y >=300):
print( "Crash!!!" )
running = False
a +=1
^^^^^^^^ the above lines needs to be changed to allow the changing of lines ^^^^^^^^^^^^^
if x + i == winpos1 and (y >= winpos2 and y <= winpos2):
print"Winner"
running = False
if x + i == slin2_1 and (y + 48 <=200 or y + 48 >=300):
print( "Crash!!!" )
running = False
a += 1
^^^^^^^^ the above line needs to be changed to allow the changing of lines ^^^^^^^^^^^^^
if x + i == winpos1 and (y + 48 >= winpos2 and y + 48 <= winpos2):
print"Winner"
running = False
if x == winpos1 and (y + i >= winpos2 and y + i <= winpos2):
print"Winner"
running = False
if x + 48 == winpos1 and (y + i >= winpos2 and y + i <= winpos2):
print"Winner"
running = False