Python Python Collections (2016, retired 2019) Dungeon Game Movement

what this line actually does?

Hi, anyone can explain more to me what this line actually does?

if move in valid_moves:
        player = move_player(player, move)

i understand that ii check if the player entered a valid move, why when we call the function i pass the "player" and "move"?, i pass player to get his location? and move to tell my "IF" statements in the function getmoves where to go?

Please paste in your code for move_player().

Daniel Escobar
Daniel Escobar
2,580 Points

Not sure if if are good with this part, although I am not the best at this, what I gathered from the code is that move is the input from who is playing and then if that input(move) is valid then the player will move to that location within the map.