The dice game

Shakuni, Duryodhana's uncle, now arranges a dice game, playing against Yudhishthira with loaded dice. In the dice game, Yudhishthira loses all his wealth, then his kingdom. Yudhishthira then gambles his brothers, himself, and finally his wife into servitude. The jubilant Kauravas insult the Pandavas in their helpless state and even try to disrobe Draupadi in front of the entire court, but Draupadi's disrobe is prevented by Krishna, who miraculously make her dress endless, therefore it couldn't be removed.
Dhritarashtra, Bhishma, and the other elders are aghast at the situation, but Duryodhana is adamant that there is no place for two crown princes in Hastinapura. Against his wishes Dhritarashtra calls for another dice game. The Pandavas are required to go into exile for 12 years, and in the 13th year, they must remain hidden called as Agyaata Vaasa. If they are discovered by the Kauravas in the 13th year of their exile, then they will be forced into exile for another 12 years.
Exile and return
The Pandavas spend thirteen years in exile; many adventures occur during this time. The Pandavas acquire many divine weapons, given by gods, during this period. They also prepare alliances for a possible future conflict. They spend their final year in disguise in the court of the king Virata, and they are discovered just after the end of the year.
At the end of their exile, they try to negotiate a return to Indraprastha with Krishna as their emissary. However, this negotiation fails, because Duryodhana objected that they were discovered in the 13th year of their exile and the return of their kingdom was not agreed upon. Then the Pandavas fought the Kauravas, claiming their rights over Indraprastha.