Commits

Jason Scheirer  committed 4ed322d

Work-in-progress

  • Participants
  • Parent commits fe3ea26

Comments (0)

Files changed (1)

File problem81.go

 			}
 		}
 	}
+
+	rowpos, colpos := maxrow + 1, len(matrix[0]) - 1
+	for {
+		if (rowpos == 0 && colpos == 0) {
+			break
+		}
+		fmt.Printf("%v, %v", colpos, rowpos)
+		if (matrix[rowpos][colpos].direction == LEFT) {
+			colpos -= 1
+		} else if (matrix[rowpos][colpos].direction == UP) {
+			rowpos -= 1
+		} else {
+			fmt.Printf("This should never happen\n")
+			break
+		}
+	}
 }