For the other error, there should not be any line of sight checking in the 'obstructedMovement' method. It should only contain the code for the actions of the enemy when we already know that the view is obstructed. If you want that the enemy move randomly, you might just try removing the 'obstructedMovement' method and changing the call to it at line 64 to 'randomMovement'.

