Implemented code to make isValidMoveTest and calcTargetsTest pass