Krishna simply wasn't around at the time to prevent the game of dice. He was busy fighting Sālva who had earlier besieged Dwaraka (to avenge Shishupala's death) during Krishna's absence. But this is what Krishna [says][1] addressing Yudhishtira, in Vana Parva of Mahabharata, on how he would have prevented the dice game from happening at all: > Vasudeva said, "O lord of earth, **if I had been present at Dwaraka, then, O king, this evil would not have befallen thee! And, O irrepressible one, coming unto the gambling-match, even if uninvited by the son of Ambika (Dhritarashtra), or Duryodhana, or by the other Kauravas, I would have prevented the game from taking place**, by showing its many evils, summoning to my aid Bhishma and Drona and Kripa, and Vahlika! O exalted one, for thy sake I would have told the son of Vichitravirya--O foremost of monarchs, let thy sons have nothing to do with dice!--I would have shown the many evils (of dice) through which thou hast fallen into such distress and the son of Virasena was formerly deprived of his kingdom! O king, unthought of evils, befall a man from dice! I would have described how a man once engaged in the game continueth to play (from desire of victory). > > Women, dice, hunting and drinking to which people become addicted in consequence of temptation, have been regarded as the four evils that deprive a man of prosperity. And those versed in the Sastras are of opinion that evils attend upon all these. They also that are addicted to dice know all its evils. O thou of mighty arms, appearing before the son of Ambika, I would have pointed out that through dice men in a day lose their possessions, and fall into distress, and are deprived of their untasted wealth, and exchange harsh words! O perpetuator of the Kuru race, I would have pointed out these and other attendant evils! If he had accepted my words thus addressed, the welfare of the Kurus as also virtue itself would both have been secured! >**And, O foremost of kings, if he had rejected my gentle counsels offered as medicine, then, O best of the Bharata race, I would have compelled him by force! And, if those who wait at his court, professing to be his friends but in reality his foes, had supported him, then I would have slain them all**, along with those gamblers, there present! > > O Kauravya, **it is owing to my absence from the Anartta country at that time that thou hast fallen into such distress begot of dice!** O thou best of Kurus, O son of Pandu, on arriving at Dwaraka I learnt from Yuyudhana all about thy calamity! And, O foremost of kings, directly I heard it with a heart sore agitated by grief, have I speedily come here wishing to see thee, O king! Alas! O bull of the Bharata race, ye have all fallen into dire distress! I see thee with thy brothers plunged in misfortune!" [1]: http://www.sacred-texts.com/hin/m03/m03013.htm