0
Check out this Code & Suggest me the Improvement
https://www.sololearn.com/en/compiler-playground/cCFW794jdcQQ
2 Answers
+ 1
Sanjaykrishna Hegade đŽđł the bug is in move_player(). When the die roll would result in an invalid move the move_player() function fails to return any value, so the calling procedure gets None and assigns that to its new position. Later, the logic tries to perform addition with None, but Python does not allow it.
Insert at line 37: return player
0
Use Feed post for suggestions.