浏览代码

Day 17 cleanup

Taddeus Kroes 7 年之前
父节点
当前提交
2ff2da5dc2
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      17_reservoir.py

+ 2 - 2
17_reservoir.py

@@ -69,8 +69,8 @@ def flow(grid, w):
 
                 # break condition above checks fow clay and water, but we only
                 # keep flowing through sand
-                lflow = not lwall and grid[left] == SAND
-                rflow = not rwall and grid[right] == SAND
+                lflow = grid[left] == SAND
+                rflow = grid[right] == SAND
 
                 if lflow and rflow:
                     # flow continues on both ends, fork