prevent reversing direction by keeping track of last moved direction