implemented player logic and mechanics