Added validPosition to setPosition in PLayer