<jupyter_start><jupyter_text>Solution<jupyter_code>num_players = 10

b = Board(num_players=num_players)
d = Dice()
curr_player = 0
b.reset()
b.set_current_player(curr_player)

while True:
    steps = d.roll()
    
    print('player %d makes %d steps' % (curr_player+1, steps))
    b.make_move(steps)
    
    if b.at_ladder_start():
        p1 = b.get_position()
        b.move_to_ladder_end()
        p2 = b.get_position()
        print('player %d took ladder %d -> %d' % (curr_player+1, p1, p2))

    if b.at_snake_head():
        p1 = b.get_position()
        b.move_to_snake_tail()
        p2 = b.get_position()
        print('player %d was eaten by a snake %d -> %d' % (curr_player+1, p1, p2))
        
    if b.player_won():
        print('player %d WON!!!!!!'% (curr_player+1))
        b.print_player_positions()
        break
        
    curr_player += 1
    curr_player = curr_player % num_players
    b.set_current_player(curr_player)<jupyter_output>player 1 makes 1 steps
player 2 makes 1 steps
player 3 makes 3 steps
player 3 took ladder 3 -> 34
player 4 makes 1 steps
player 5 makes 4 steps
player 6 makes 3 steps
player 6 took ladder 3 -> 34
player 7 makes 1 steps
player 8 makes 1 steps
player 9 makes 1 steps
player 10 makes 6 steps
player 1 makes 2 steps
player 1 took ladder 3 -> 34
player 2 makes 3 steps
player 3 makes 2 steps
player 4 makes 6 steps
player 5 makes 2 steps
player 6 makes 4 steps
player 7 makes 1 steps
player 8 makes 2 steps
player 8 took ladder 3 -> 34
player 9 makes 2 steps
player 9 took ladder 3 -> 34
player 10 makes 3 steps
player 1 makes 1 steps
player 2 makes 5 steps
player 3 makes 5 steps
player 4 makes 1 steps
player 5 makes 4 steps
player 5 took ladder 10 -> 24
player 6 makes 3 steps
player 7 makes 2 steps
player 8 makes 4 steps
player 9 makes 1 steps
player 10 makes 1 steps
player 10 took ladder 10 -> 24
player 1 makes 1 steps
player 2 makes 3 steps
player 3 makes 5 steps
player 4 makes 4 steps
player 5 [...]
{'fraction_non_alphanumeric': 0.0762970498474059, 'fraction_numerical': 0.06052899287894201, 'mean_word_length': 3.0061099796334014, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '210169', 'license': 'CC0-1.0', 'n_tokens_mistral': 743, 'n_tokens_neox': 632, 'n_words': 284, 'path': 'Homework/Board_game_Solution.ipynb', 'repo_name': 'KingaS03/Introduction-to-Python-2020-June', 'size': '1966'}