refactored space map, created border for better adjacent square checking