Add condition for when the target is also the cap for jug A
This commit is contained in:
parent
d8e1649288
commit
f06ea2136f
1 changed files with 1 additions and 1 deletions
|
|
@ -23,7 +23,7 @@ def fillJug(rounds, jugA, jugB, target):
|
|||
jugB["state"] -= pour
|
||||
print(rounds, jugA, jugB)
|
||||
|
||||
if jugA["state"] == jugA["cap"]:
|
||||
if jugA["state"] == jugA["cap"] and jugA["state"] != target:
|
||||
jugA["state"] = 0 #empty jugA if full
|
||||
print(rounds, jugA, jugB)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue