master
E. Almqvist 4 years ago
parent 88d59773bf
commit 69572f4c59
  1. 7
      2020/12.py

@ -140,16 +140,11 @@ def runNavWay( nav, way, pos ):
return pos, way return pos, way
for nav in navigation:
boatpos, boatfacing, boatfacingIndex = runNav(nav, boatpos, boatfacing, boatfacingClock, boatfacingIndex)
#print(f"\nPOS {boatfacing=} {boatpos=}")
for nav in navigation: for nav in navigation:
boatpos, boatfacing, boatfacingIndex = runNav(nav, boatpos, boatfacing, boatfacingClock, boatfacingIndex)
boatpos2, waypoint = runNavWay(nav, waypoint, boatpos2) boatpos2, waypoint = runNavWay(nav, waypoint, boatpos2)
#print(f"\n POS {boatpos2=} {waypoint=}")
print("Part1:", calcDistance(boatpos)) print("Part1:", calcDistance(boatpos))
print("Part2:", calcDistance(boatpos2)) print("Part2:", calcDistance(boatpos2))

Loading…
Cancel
Save