From: lenovo Date: Tue, 3 Dec 2013 21:15:23 +0000 (+0000) Subject: Completed rules X-Git-Url: https://adrianiainlam.tk/git/?a=commitdiff_plain;h=refs%2Fheads%2Fmaster;p=Blackjack.git Completed rules --- diff --git a/Blackjack.exe b/Blackjack.exe index 3bb4e1a..dbae131 100644 Binary files a/Blackjack.exe and b/Blackjack.exe differ diff --git a/src/Blackjack.sln b/src/Blackjack.sln index 7653434..b65aa00 100644 --- a/src/Blackjack.sln +++ b/src/Blackjack.sln @@ -5,12 +5,24 @@ Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "Blackjack", "Blackjack\Blac EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Debug|x64 = Debug|x64 Debug|x86 = Debug|x86 + Release|Any CPU = Release|Any CPU + Release|x64 = Release|x64 Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C10E3BCC-91CC-4358-A93A-74E2895D064E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C10E3BCC-91CC-4358-A93A-74E2895D064E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C10E3BCC-91CC-4358-A93A-74E2895D064E}.Debug|x64.ActiveCfg = Debug|x64 + {C10E3BCC-91CC-4358-A93A-74E2895D064E}.Debug|x64.Build.0 = Debug|x64 {C10E3BCC-91CC-4358-A93A-74E2895D064E}.Debug|x86.ActiveCfg = Debug|x86 {C10E3BCC-91CC-4358-A93A-74E2895D064E}.Debug|x86.Build.0 = Debug|x86 + {C10E3BCC-91CC-4358-A93A-74E2895D064E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C10E3BCC-91CC-4358-A93A-74E2895D064E}.Release|Any CPU.Build.0 = Release|Any CPU + {C10E3BCC-91CC-4358-A93A-74E2895D064E}.Release|x64.ActiveCfg = Release|x64 + {C10E3BCC-91CC-4358-A93A-74E2895D064E}.Release|x64.Build.0 = Release|x64 {C10E3BCC-91CC-4358-A93A-74E2895D064E}.Release|x86.ActiveCfg = Release|x86 {C10E3BCC-91CC-4358-A93A-74E2895D064E}.Release|x86.Build.0 = Release|x86 EndGlobalSection diff --git a/src/Blackjack.suo b/src/Blackjack.suo index 3592953..5c368d8 100644 Binary files a/src/Blackjack.suo and b/src/Blackjack.suo differ diff --git a/src/Blackjack/Blackjack.vb b/src/Blackjack/Blackjack.vb index 4d70bdd..573258c 100644 --- a/src/Blackjack/Blackjack.vb +++ b/src/Blackjack/Blackjack.vb @@ -493,6 +493,7 @@ Public Class Blackjack SecondBet = InputBox("Please enter a correct numerical positive integral value:") End If End While + SecondBet = CStr(Int(Val(SecondBet))) TxtTotal.Text = CStr(Val(TxtTotal.Text) - Val(SecondBet)) diff --git a/src/Blackjack/Blackjack.vbproj b/src/Blackjack/Blackjack.vbproj index 932134e..8f2ef9f 100644 --- a/src/Blackjack/Blackjack.vbproj +++ b/src/Blackjack/Blackjack.vbproj @@ -18,7 +18,7 @@ - x86 + AnyCPU true full true @@ -26,9 +26,11 @@ bin\Debug\ Blackjack.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + - x86 + AnyCPU pdbonly false true @@ -36,6 +38,8 @@ bin\Release\ Blackjack.xml 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + + On @@ -49,6 +53,51 @@ On + + true + true + true + bin\x64\Debug\ + Blackjack.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + full + AnyCPU + false + false + false + + + true + bin\x64\Release\ + Blackjack.xml + true + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + pdbonly + AnyCPU + false + + + true + true + true + bin\Debug\ + Blackjack.xml + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + full + AnyCPU + false + false + false + + + true + bin\Release\ + Blackjack.xml + true + 42016,41999,42017,42018,42019,42032,42036,42020,42021,42022 + pdbonly + AnyCPU + @@ -117,7 +166,9 @@ - + + Designer + MyApplicationCodeGenerator Application.Designer.vb diff --git a/src/Blackjack/Rules.resx b/src/Blackjack/Rules.resx index 29dcb1b..5ea0895 100644 --- a/src/Blackjack/Rules.resx +++ b/src/Blackjack/Rules.resx @@ -112,9 +112,9 @@ 2.0 - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 \ No newline at end of file diff --git a/src/Blackjack/Rules.vb b/src/Blackjack/Rules.vb index a34cd6f..1b680bc 100644 --- a/src/Blackjack/Rules.vb +++ b/src/Blackjack/Rules.vb @@ -4,28 +4,48 @@ ' * Last edited 22/11/2013 * ' * Version: beta * ' ********************************************************************************** -' * This file is part of Blackjack * +' * This file is a documentation of Blackjack * ' * * -' * Blackjack is free software: you can redistribute it and/or modify * -' * it under the terms of the GNU General Public License as published by * -' * the Free Software Foundation; either version 3 of the License, or * -' * (at your option) any later version. * -' * * -' * This program is distributed in the hope that it will be useful, * -' * but WITHOUT ANY WARRANTY; without even the implied warrranty of * -' * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -' * GNU General Public License for more details. * -' * * -' * You should have received a copy of the GNU General Public License * -' * along with this program; if not, see * +' * Permission is granted to copy, distribute and/or modify this document * +' * under the terms of the GNU Free Documentation License, Version 1.3 * +' * or any later version published by the Free Software Foundation; * +' * with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. * +' * A copy of the license is included in the file entitled "GNU Free * +' * Documentation License". * ' * * ' **********************************************************************************/ Public Class Rules Private Sub Rules_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load - TxtRules.Text = "Rule number 1" & Chr(13) & Chr(10) & _ - "Rule number 2" & Chr(13) & Chr(10) & _ - "Lorem ipsum dolor sit amet" & Chr(13) & Chr(10) + TxtRules.Text = _ + "Blackjack" & Chr(13) & Chr(10) & _ + "In this game, you start with 100 non-divisible monetary units, and you must place a valid bet before the game starts" & Chr(13) & Chr(10) & _ + "This game follows all typical single-deck Blackjack rules with the following variations:" & Chr(13) & Chr(10) & _ + " 1. Your hand is automatically won if it has 5 cards and is not busted. The dealer stands if his hand has 5 cards and is not busted" & Chr(13) & Chr(10) & _ + " 2. H17 - The dealer must hit on soft 17 (when the hand can either be 7 or 17). Variation 1 overrides this variation." & Chr(13) & Chr(10) & _ + " 3. Split to 2 - You can only split once." & Chr(13) & Chr(10) & _ + " 4. Blackjack pays 3:2" & Chr(13) & Chr(10) & _ + " 5. Insurance pays 1:2" & Chr(13) & Chr(10) & _ + Chr(13) & Chr(10) & "---------------------------------------------------------------" & Chr(13) & Chr(10) & _ + "The detailed rules of Blackjack are as follows: [1]" & Chr(13) & Chr(10) & _ + Chr(13) & Chr(10) & "You are dealt an initial hand of two cards. The dealer's hand receives its first card face up, and immediately receives its second card face down (the hole card), which the dealer peeks at but does not reveal unless it makes the dealer's hand a blackjack." & Chr(13) & Chr(10) & _ + Chr(13) & Chr(10) & "Your object is to win money by creating card totals that turn out to be higher than the dealer's hand but do not exceed 21 (''busting''/''breaking''), or alternatively by allowing the dealer to take additional cards until she busts. On your turn, you must choose whether to ''hit'' (take a card), ''stand'' (end your turn), ''double'' (double wager, take a single card and finish) or ''split'' (if the two cards have the same value, separate them to make two hands). Number cards count as their natural value; the jack, queen, and king (also known as ''face cards'' or ''pictures'') count as 10; aces are valued as either 1 or 11 according to the player's choice. If the hand value exceeds 21 points, it busts, and all bets on it are immediately forfeit." & Chr(13) & Chr(10) & _ + Chr(13) & Chr(10) & "After you have finished playing, the dealer's hand is resolved by drawing cards until the hand busts or achieves a value of 17 or higher (a dealer total of 17 including an ace, or ''soft 17'', must be drawn to). The dealer never doubles or splits. If the dealer busts, you win. If the dealer does not bust, each remaining bet wins if its hand is higher than the dealer's, and loses if it is lower. In the case of a tied score, known as ''push'' or ''standoff'', bets are normally returned without adjustment; however, a blackjack beats any hand that is not a blackjack, even one with a value of 21. An outcome of blackjack vs. blackjack results in a push. Wins are paid out at 1:1, or equal to the wager, except for winning blackjacks, which are paid at 3:2 (meaning you receive three dollars for every two bet), or one-and-a-half times the wager." & Chr(13) & Chr(10) & _ + Chr(13) & Chr(10) & "***Player decisions***" & Chr(13) & Chr(10) & _ + "After receiving an initial two cards, the player has up to four standard options: ''hit'', ''stand'', ''double down'', or ''split''. " & Chr(13) & Chr(10) & _ + "- Hit: Take another card from the dealer." & Chr(13) & Chr(10) & _ + "- Stand: Take no more cards, also known as ''stand pat'', ''stick'', or ''stay''." & Chr(13) & Chr(10) & _ + "- Double down (only available as the first decision of a hand): You are allowed to increase the initial bet by up to 100% in exchange for committing to stand after receiving exactly one more card." & Chr(13) & Chr(10) & _ + "- Split (only available as the first decision of a hand): If the first two cards have the same value, you can split them into two hands. The dealer separates the two cards and draws an additional card on each, placing one bet with each hand. You then play out the two separate hands in turn, with some restrictions. In the case of ten-valued cards, splitting is allowed only when the cards have the identical ranks; for instance, a hand of 10-10 may be split, but not one of 10-king. Doubling and further splitting of post-split hands is not allowed, and blackjacks after a split are counted as non-blackjack 21 when comparing against the dealer's hand." & Chr(13) & Chr(10) & _ + Chr(13) & Chr(10) & "On reaching 21 (including soft 21), the hand is required to stand. When the last hand has finished being played, the dealer reveals the hole card, and stands or draws further cards according to the rules of the game for dealer drawing. When the outcome of the dealer's hand is established, any hands with bets remaining on the table are resolved: bets on losing hands are forfeited, the bet on a push is left on the table, and winners are paid out." & Chr(13) & Chr(10) & _ + Chr(13) & Chr(10) & "***Insurance***" & Chr(13) & Chr(10) & _ + "If the dealer's upcard is an ace, you are offered the option of taking ''insurance'' before the dealer checks the hole card." & Chr(13) & Chr(10) & _ + "Insurance is a side bet that the dealer has blackjack and is treated independently of the main wager. It pays 2:1 (meaning that the player receives two dollars for every dollar bet) and is available when the dealer's exposed card is an ace. The idea is that the dealer's second card has a fairly high probability (nearly one-third) to be ten-valued, giving the dealer blackjack and disappointment for the player. It is attractive (although not necessarily wise) for the player to insure against the possibility of a dealer blackjack by making a maximum ''insurance'' bet, in which case the ''insurance proceeds'' will make up for the concomitant loss on the original bet. The player may add up to half the value of their original bet to the insurance and these extra chips are placed on a portion of the table usually marked ''Insurance pays 2 to 1''." & Chr(13) & Chr(10) & _ + "Players with a blackjack may also take insurance." & Chr(13) & Chr(10) & _ + Chr(13) & Chr(10) & _ + "[1]: Copied with modification from Blackjack, article from Wikipedia, the Free Encyclopedia. The article can be found here: http://en.wikipedia.org/wiki/Blackjack . This text is used under the GNU Free Documentation License." & Chr(13) & Chr(10) & Chr(13) & Chr(10) & _ + "This documentation is released under the GNU Free Documentation License." & Chr(13) & Chr(10) & _ + "Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the file entitled ''GNU Free Documentation License''." TxtRules.Select(0, 0) End Sub diff --git a/src/Blackjack/obj/Release/Blackjack.Blackjack.resources b/src/Blackjack/obj/Release/Blackjack.Blackjack.resources new file mode 100644 index 0000000..06c24d0 Binary files /dev/null and b/src/Blackjack/obj/Release/Blackjack.Blackjack.resources differ diff --git a/src/Blackjack/obj/Release/Blackjack.Resources.resources b/src/Blackjack/obj/Release/Blackjack.Resources.resources new file mode 100644 index 0000000..06c24d0 Binary files /dev/null and b/src/Blackjack/obj/Release/Blackjack.Resources.resources differ diff --git a/src/Blackjack/obj/Release/Blackjack.Rules.resources b/src/Blackjack/obj/Release/Blackjack.Rules.resources new file mode 100644 index 0000000..06c24d0 Binary files /dev/null and b/src/Blackjack/obj/Release/Blackjack.Rules.resources differ diff --git a/src/Blackjack/obj/Release/Blackjack.exe b/src/Blackjack/obj/Release/Blackjack.exe new file mode 100644 index 0000000..dbae131 Binary files /dev/null and b/src/Blackjack/obj/Release/Blackjack.exe differ diff --git a/src/Blackjack/obj/Release/Blackjack.pdb b/src/Blackjack/obj/Release/Blackjack.pdb new file mode 100644 index 0000000..cd7f942 Binary files /dev/null and b/src/Blackjack/obj/Release/Blackjack.pdb differ diff --git a/src/Blackjack/obj/Release/Blackjack.vbproj.FileListAbsolute.txt b/src/Blackjack/obj/Release/Blackjack.vbproj.FileListAbsolute.txt new file mode 100644 index 0000000..82fb5d1 --- /dev/null +++ b/src/Blackjack/obj/Release/Blackjack.vbproj.FileListAbsolute.txt @@ -0,0 +1,13 @@ +\\student\users$\00alam\Visual Studio 2010\Projects\Blackjack\Blackjack\bin\Release\Blackjack.exe.config +\\student\users$\00alam\Visual Studio 2010\Projects\Blackjack\Blackjack\bin\Release\Blackjack.exe +\\student\users$\00alam\Visual Studio 2010\Projects\Blackjack\Blackjack\bin\Release\Blackjack.pdb +\\student\users$\00alam\Visual Studio 2010\Projects\Blackjack\Blackjack\bin\Release\Blackjack.xml +\\student\users$\00alam\Visual Studio 2010\Projects\Blackjack\Blackjack\obj\Release\Blackjack.Blackjack.resources +\\student\users$\00alam\Visual Studio 2010\Projects\Blackjack\Blackjack\obj\Release\Blackjack.Resources.resources +\\student\users$\00alam\Visual Studio 2010\Projects\Blackjack\Blackjack\obj\Release\Blackjack.Rules.resources +\\student\users$\00alam\Visual Studio 2010\Projects\Blackjack\Blackjack\obj\Release\Blackjack.exe +\\student\users$\00alam\Visual Studio 2010\Projects\Blackjack\Blackjack\obj\Release\Blackjack.xml +\\student\users$\00alam\Visual Studio 2010\Projects\Blackjack\Blackjack\obj\Release\Blackjack.pdb +\\student\users$\00alam\Visual Studio 2010\Projects\Blackjack\Blackjack\obj\Release\ResolveAssemblyReference.cache +\\student\users$\00alam\Visual Studio 2010\Projects\Blackjack\Blackjack\obj\Release\ResGen.read.1.tlog +\\student\users$\00alam\Visual Studio 2010\Projects\Blackjack\Blackjack\obj\Release\ResGen.write.1.tlog diff --git a/src/Blackjack/obj/Release/Blackjack.xml b/src/Blackjack/obj/Release/Blackjack.xml new file mode 100644 index 0000000..6de1d0d --- /dev/null +++ b/src/Blackjack/obj/Release/Blackjack.xml @@ -0,0 +1,24 @@ + + + + +Blackjack + + + + + + Returns the cached ResourceManager instance used by this class. + + + + Overrides the current thread's CurrentUICulture property for all + resource lookups using this strongly typed resource class. + + + + A strongly-typed resource class, for looking up localized strings, etc. + + + + \ No newline at end of file diff --git a/src/Blackjack/obj/Release/DesignTimeResolveAssemblyReferences.cache b/src/Blackjack/obj/Release/DesignTimeResolveAssemblyReferences.cache new file mode 100644 index 0000000..52665e5 Binary files /dev/null and b/src/Blackjack/obj/Release/DesignTimeResolveAssemblyReferences.cache differ diff --git a/src/Blackjack/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache b/src/Blackjack/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..b2d9c88 Binary files /dev/null and b/src/Blackjack/obj/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/src/Blackjack/obj/Release/ResGen.read.1.tlog b/src/Blackjack/obj/Release/ResGen.read.1.tlog new file mode 100644 index 0000000..9d63b47 Binary files /dev/null and b/src/Blackjack/obj/Release/ResGen.read.1.tlog differ diff --git a/src/Blackjack/obj/Release/ResGen.write.1.tlog b/src/Blackjack/obj/Release/ResGen.write.1.tlog new file mode 100644 index 0000000..7485d19 Binary files /dev/null and b/src/Blackjack/obj/Release/ResGen.write.1.tlog differ diff --git a/src/Blackjack/obj/Release/ResolveAssemblyReference.cache b/src/Blackjack/obj/Release/ResolveAssemblyReference.cache new file mode 100644 index 0000000..2e30228 Binary files /dev/null and b/src/Blackjack/obj/Release/ResolveAssemblyReference.cache differ diff --git a/src/Blackjack/obj/Release/TempPE/My Project.Resources.Designer.vb.dll b/src/Blackjack/obj/Release/TempPE/My Project.Resources.Designer.vb.dll new file mode 100644 index 0000000..46c540e Binary files /dev/null and b/src/Blackjack/obj/Release/TempPE/My Project.Resources.Designer.vb.dll differ diff --git a/src/Blackjack/obj/x64/Debug/Blackjack.vbproj.FileListAbsolute.txt b/src/Blackjack/obj/x64/Debug/Blackjack.vbproj.FileListAbsolute.txt new file mode 100644 index 0000000..7336bbb --- /dev/null +++ b/src/Blackjack/obj/x64/Debug/Blackjack.vbproj.FileListAbsolute.txt @@ -0,0 +1 @@ +\\student\users$\00alam\Visual Studio 2010\Projects\Blackjack\Blackjack\bin\x64\Debug\Blackjack.exe.config diff --git a/src/Blackjack/obj/x64/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/src/Blackjack/obj/x64/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..710d541 Binary files /dev/null and b/src/Blackjack/obj/x64/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/src/Blackjack/obj/x64/Debug/TempPE/My Project.Resources.Designer.vb.dll b/src/Blackjack/obj/x64/Debug/TempPE/My Project.Resources.Designer.vb.dll new file mode 100644 index 0000000..b9918c4 Binary files /dev/null and b/src/Blackjack/obj/x64/Debug/TempPE/My Project.Resources.Designer.vb.dll differ diff --git a/src/Blackjack/obj/x64/Release/DesignTimeResolveAssemblyReferencesInput.cache b/src/Blackjack/obj/x64/Release/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000..05180aa Binary files /dev/null and b/src/Blackjack/obj/x64/Release/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/src/Blackjack/obj/x64/Release/TempPE/My Project.Resources.Designer.vb.dll b/src/Blackjack/obj/x64/Release/TempPE/My Project.Resources.Designer.vb.dll new file mode 100644 index 0000000..784c6c8 Binary files /dev/null and b/src/Blackjack/obj/x64/Release/TempPE/My Project.Resources.Designer.vb.dll differ diff --git a/src/Blackjack/obj/x86/Debug/Blackjack.exe b/src/Blackjack/obj/x86/Debug/Blackjack.exe index 0d21f34..397ee59 100644 Binary files a/src/Blackjack/obj/x86/Debug/Blackjack.exe and b/src/Blackjack/obj/x86/Debug/Blackjack.exe differ diff --git a/src/Blackjack/obj/x86/Debug/Blackjack.pdb b/src/Blackjack/obj/x86/Debug/Blackjack.pdb index 983f2b8..cfc8a67 100644 Binary files a/src/Blackjack/obj/x86/Debug/Blackjack.pdb and b/src/Blackjack/obj/x86/Debug/Blackjack.pdb differ diff --git a/src/Blackjack/obj/x86/Debug/GenerateResource.write.1.tlog b/src/Blackjack/obj/x86/Debug/GenerateResource.write.1.tlog index 535321b..9267127 100644 Binary files a/src/Blackjack/obj/x86/Debug/GenerateResource.write.1.tlog and b/src/Blackjack/obj/x86/Debug/GenerateResource.write.1.tlog differ diff --git a/src/Blackjack/obj/x86/Release/Blackjack.exe b/src/Blackjack/obj/x86/Release/Blackjack.exe index dedf72b..6eb5d96 100644 Binary files a/src/Blackjack/obj/x86/Release/Blackjack.exe and b/src/Blackjack/obj/x86/Release/Blackjack.exe differ diff --git a/src/Blackjack/obj/x86/Release/Blackjack.pdb b/src/Blackjack/obj/x86/Release/Blackjack.pdb index 3a1ee9b..61b5444 100644 Binary files a/src/Blackjack/obj/x86/Release/Blackjack.pdb and b/src/Blackjack/obj/x86/Release/Blackjack.pdb differ diff --git a/src/Blackjack/obj/x86/Release/GenerateResource.write.1.tlog b/src/Blackjack/obj/x86/Release/GenerateResource.write.1.tlog index 535321b..5dfe584 100644 Binary files a/src/Blackjack/obj/x86/Release/GenerateResource.write.1.tlog and b/src/Blackjack/obj/x86/Release/GenerateResource.write.1.tlog differ