04_angelcin_zapis

This commit is contained in:
Gašper Dobrovoljc
2023-11-09 21:58:58 +01:00
parent fd4a954d41
commit 39771d36ce
3 changed files with 76 additions and 3 deletions

View File

@@ -8,10 +8,10 @@ def dolzina_ovir(vrstica):
def stevilo_ovir(vrstica):
count = 0
ovira = False
for char in vrstica:
if char == "#":
if not ovira:
ovira = True
ovira = True
elif ovira:
count += 1
ovira = False
@@ -55,7 +55,7 @@ def pretvori_zemljevid(vrstice):
for ovira in pretvori_vrstico(vrstica):
ovire.append((*ovira, y))
return ovire
def izboljsave(prej, potem):
nove_ovire = []
star_zemljevid = pretvori_zemljevid(prej)