I want to have goblins walking back and forth through hallways. They turn around when they encounter a rock. I tried writing a can move for this, but it is not running properly. I'm just completely lost for how to do this. So far I have functions for moveUp() and moveDown() (those work) and a canMove() boolean (that properly could use some revising). Can anyone help?
