changed dir to getDirection in Player