created _isValidIndex(), _isValidRow() and _isValidCol() from old _verifyIndex() and _verifyRowCol()
factored out _getPositionByTargetAndDirection(), added tests