Making Player function an object and adding a method