introduces sanitizer, refactors get_player_move