8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5839877 commit b6795cdCopy full SHA for b6795cd
2022/day14.py
@@ -78,7 +78,6 @@ def keep_pouring(self, with_floor=True):
78
if with_floor:
79
self._add_floor()
80
while(self.drop_grain(with_floor)):
81
- self.draw(with_floor=with_floor)
82
continue
83
return len(self.grains)
84
@@ -90,10 +89,11 @@ def _add_floor(self):
90
89
self.grid.append(['#'] * max_x)
91
92
def main():
93
- filename = 'inputs/2022/day14-test.txt'
+ filename = 'inputs/2022/day14.txt'
94
cave = Cave(filename)
95
- cave.keep_pouring(True)
96
- #print(f'Part 1: {cave.keep_pouring(False)}')
+ print(f'Part 1: {cave.keep_pouring(False)}')
+ cave = Cave(filename)
+ print(f'Part 1: {cave.keep_pouring(True)}')
97
98
if __name__ == '__main__':
99
main()
0 commit comments