implemented countReachablePositions
implemented the player logic, but some subroutines are still missing
implemented getClosestReachable and getSaferMoves
stop following target if unreachable