Skip to content

Commit

Permalink
/ ‘diehard/jug-solver.py’
Browse files Browse the repository at this point in the history
  • Loading branch information
PHLAK committed Jun 15, 2013
1 parent 707b957 commit e127d01
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions diehard/jug-solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,18 @@
s.send('look blue jug\n')
out = s.recv(8192)
print out
blue = [int(i) for i in out.split() if i.isdigit()]

blue = [int(i) for i in out.split() if i.isdigit()]
blueMax = blue[1]
print blueMax

# Get red jug value
s.send('look red jug\n')
time.sleep(.1)
out = s.recv(8192)
red = [int(i) for i in out.split() if i.isdigit()]
print out

red = [int(i) for i in out.split() if i.isdigit()]
redMax = red[1]
print redMax

Expand Down

0 comments on commit e127d01

Please sign in to comment.