To win, you must complete the required number of levels before your opponents. Only the first player to finish claims the treasure and moves to the next stage.