Skip to content

Commit

Permalink
week
Browse files Browse the repository at this point in the history
  • Loading branch information
Wysaat committed May 18, 2013
1 parent 81d29fa commit acdf14b
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 114,38 @@
# 6. add final message
# CAUTION!!! what x and y mean
x = size - 1
y = size - 1
y = size - 1

lflag = 1
# vflag 0 means walk up
vflag = 0

while True:
if lflag == 0 and vflag == 0:
if x == 0:
next = matrix[x][y - 1]
position = (x, y - 1)
else:
next = matrix[x - 1][y 1]
position = (x - 1, y 1)
if lflag == 0 and vflag == 1:
if x == size - 1:
next = matrix[x][y - 1]
position = (x, y - 1)
else:
next = matrix[x 1][y 1]
position = (x 1, y 1)
if lflag == 1:
next = matrix[x][y - 1]
position = (x, y - 1)

while next >= 0:
next, position = findnext(position)





while True:
# walk left is seldom a problem, don't it consider at the moment
if lflag == 1:
Expand Down

0 comments on commit acdf14b

Please sign in to comment.