IS GAMBLING FORBIDDEN? [Asmachta :gambling]
Gemara
24b (Mishnah): Diceplayers may not judge or testify.
R. Yehudah: This is if they have no other profession. If they have another profession, they are Kesherim.
(Rami bar Chama): They are Pasul because betting is Asmachta (the loser did not resolve to pay if he loses, for he expected to win). It is not a Kinyan (the winner is not entitled to the money).
(Rav Sheshes): This is not Asmachta. Rather, it is because they do not contribute to society.
25a (Chachamim of Bavel): Mafrichei Yonim are people who bet 'if my dove will come before your dove...'
The Tana needed to teach both of these. Had he taught only diceplayers, one might have thought that this is Asmachta, for he relies on his own skill, but a bird racer knows that he may lose (and resolves to pay if he loses). Had he taught only one who relies on his bird, one might have thought that this is Asmachta, for he is sure that he will win due to his skill to bang on boards to make his bird go faster, but a diceplayer realizes that he may lose.
Bava Metzia 73b (Rav Ashi): If Reuven gave Shimon money to buy wine, and he was negligent and did not, even if he asked for (unspecified) wine, he just gets back his money, for this is only Asmachta. There was no Kinyan.
Question (Mishnah): If one rented a field on condition to give a certain amount of (its) Peros, and accepted that if he will not work the field, he will pay what it should have produced, this is binding.
Answer: There, he can surely work the field. Here, there is no guarantee that they would sell to him.
Rishonim
Rif and Rosh (3:7): Diceplayers are Pesulim because they do not contribute to society.
Rambam (Hilchos Gezeilah 6:10): If one plays with dice and stipulates that the winner will receive such an amount, this is Gezel mid'Rabanan. Even though the owner lets him take, since he takes it for nothing through frivolity, this is Gezel.
Question: The Halachah follows Rav Ashi. Something is in one's control is more considered Asmachta (Sanhedrin 25a)! Also, if one paid part of his debt, and said 'if I do not pay the rest by this date, I will pay the entire amount'), it is Asmachta for he relies on himself to fulfill his Tanai (Bava Basra 168a). Diceplaying is less Asmachta, for he realizes that he might lose, and he resolves to be Makneh amidst Safek.
Answer (Rosh Bava Metzia 5:70): Here, it is not in his control, i.e. it depends on others. Others need not sell to him, so he does not resolve to obligate himself. Diceplayers surely realize that it does not depend on them, and they resolve to pay. When it is totally in his hands, e.g. he promised to pay 1000 if he will not work the field, he was sure that he will do so, and did not resolve to pay the fine if he does not. If he did not exaggerate, e.g. he promised to pay what it should have produced, he is Makneh.
Beis Yosef (CM 207 DH v'Im): Talmidei ha'Rashba say that even if he did not exaggerate, letter of the law, any 'if' is Asmachta. It is a Tanai Beis Din that he must fulfill his promise. The Gemara asked against Rav Ashi why we did not enact to obligate one who promised to buy wine, like we enacted to obligate one who promised to work the field. We answered that we enacted only when it is in his control, and when he promised to pay for the loss caused, but not when he promised more (Bava Metzia 104b). Tosfos holds that any case like 'if I will not work the field', in which it is in his control and he did not exaggerate, is not Asmachta. The Ran (Bava Basra 168 DH v'Lo) holds that it is not Asmachta, but cites Rav Hai Gaon who says that it is; it was enacted that one must pay only in the case of not working the field. The Ran himself in Bava Metzia says that we enacted in every similar case! It seems that what the Ran wrote in Bava Basra was an oversight.
Rosh (ibid): If one plays dice on credit, even though this Asmachta acquires, he is not liable. Asmachta even with a Kinyan acquires only in an esteemed Beis Din. Even though some matters are acquired through words without a Kinyan, e.g. if one says 'you may bring Pasul witnesses or collect through an invalid oath', he cannot retract. That is because there was a claim, and he accepts the Din.
Hagahos Ashri (Shabbos 2:19): We hold that Asmachta acquires only in an esteemed Beis Din and with a Kinyan, e.g. he said 'from now.' This is why the custom is to gather the entire city when making Shiduchin, and we fine one who retracts, so it will be an esteemed Beis Din, for this is Asmachta.
Poskim
Shulchan Aruch (CM 207:13): Any Tana'im that people make between them, even if they were with witnesses and a document, 'if you do so I will give to you 100 or buy this house for you, and if not, or you will not do so, I will not buy or give', even if the Tanai was fulfilled, he did not acquire. Anyone who says 'if will be' or 'if will not', he did not resolve to be Makneh, for he is confident that it will or will not happen.
Rema: Some say that if something is not in the control of the one who stipulates, and not in the control of others, e.g. a diceplayer, who does not know if he will within or lose, and even so he stipulates, he resolved to be Makneh amidst Safek. This is when they play with ready coins. If they play on credit, we do not force him to pay what he lost.
SMA (32): The Rosh (66:8) says that if one won 1000 in a game, and the loser did Chalipin to obligate himself to pay, he must pay and it is not Asmachta, unless it is known that the Kinyan was in jest. If afterwards he gave a security, even if he returned the security, he must pay (Teshuvah 72:1).
SMA (33): Even though it is not Asmachta and he resolved to be Makneh, it is not a proper debt that Beis Din can force him to pay. Some say that we do not force him because Kinyan is required, and there was a Kinyan only if coins were on the board.
Gra (34): On credit we do not force him if there was no Kinyan. Words are missing in the Rosh and in Tosfos Sanhedrin 25a (Kol). It should say like it says in Tosfos Eruvin 82a (Sof DH Omar; according to the opinion that it is not Asmachta, a Kinyan is required).
Rema (ibid.): Some say that even a security for the money does not help, for since there are no coins, it is not a valid security. When the money is ready on the board, one must pay and it is not Asmachta. This is unlike those who argue and forbid to play in every case.
Gra (36): The Rambam rules like Rami bar Chama, and always forbids.
Rema (ibid.): Some permit only when both own the board on which the money rests.
Gra (37): Even though it is not Asmachta, Kinyan is required, just like buying and selling.
Rema: Some say that diceplaying is not Asmachta, for both stipulate, and each can lose, so each resolves to be Makneh. Therefore, when two bet, it they did a Kinyan, it acquires. This is when it is not in the control of either.
SMA (34): This opinion does not distinguish between whether it is partially or totally in his control. Rather, the primary Asmachta is what is totally in his control and he exaggerates. The first opinion holds that what is not in his control is more Asmachta.
Rema (ibid.): Some disagree even about this, and needed to give other reasons for diceplayers (to be Pasul) and for fines for retraction from Shiduchin.
Beis Yosef (DH Nimtza): If it is totally out of his control, like diceplaying, even if he exaggerated in a Tanai of a game, since he knows that he cannot ensure that he win, and he knows that one of them will win, he resolves to be Makneh.
SMA (35): This opinion holds that even betting is Asmachta.
R. Akiva Eiger (Sanhedrin 25a): The Gemara said that Chachamim of Bavel hold that the Tana needed to teach both Mafrichei Yonim and diceplayers. (One might have thought that only one of them is Asmachta.) What forced the Gemara to explain unlike R. Yochanan and R. Yehoshua ben Levi? It could have explained that both clauses are needed to teach that that he is Kosher when he has another profession, for Asmachta acquires! Chidushei ha'Ran says that Chachmei Bavel must hold like Rami bar Chama, for according to Rav Sheshes, it would suffice to teach one of them. I find this difficult.