refactoring: simplified getting neighbours
refactoring: direction class instead of int arrays
refactoring: rename, extract method