redundant cursor moving op
EtoDemerzel0427 opened this issue · comments
Weiran Huang commented
in step 02, you clear screen and move the cursor to (0, 0):
func clearScreen() {
fmt.Printf("\x1b[2J")
moveCursor(0, 0)
}
But the escape sequence ^[2J
should move the cursor to (0, 0) itself, so we don't have to explicitly move the cursor.
Check here.
Weiran Huang commented
Seems I misunderstood the usage.
Weiran Huang commented
Another problem:
should step 03 line 115:
case "DOWN":
newRow = newRow + 1
if newRow == len(maze)-1 {
newRow = 0
}
be if newRow == len(maze)
?