Refactoring player updateInput