The game ends when the Mine collapses. This is indicated by the position of the Cave-In token on the Cave-In track and depends on the number of people playing:

4-player game = 9 Cave-Ins

3-player game = 8 Cave-Ins

2-player game = 7 Cave-Ins

When game end is triggered, the game does not end immediately. Players keep playing so that everyone has taken the same number of turns. Therefore, the player to the right of the Start Player will always be the last person to play.

Related Rule(s)