The problem:
thank you!~
As you can see the program is massive and ridiculously hard, I have been trying to do this program for last few days , but unsuccessful. Someone please help me
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jan 11, 2012, 12:56 PM EST
Prime bRank #2,035 · 712 reputationPosted Jan 11, 2012, 1:15 PM EST
Prime bRank #2,035 · 712 reputationPosted Jan 11, 2012, 1:16 PM EST
http://www.c-sharpcorner.com/Forums/Thread/156565/who-could-help-me.aspx
Prime bRank #2,035 · 712 reputationPosted Jan 11, 2012, 4:04 PM EST
first I found mistake i highlighted yellow , it should be 0,52 not 1,53, otherwise its out of range. And then if I change it the program runs but its black screen
VulpesRank #55 · 29.2K reputationPosted Jan 11, 2012, 11:16 PM EST
1. The Random.Next method produces a random number between (inclusive) the lower bound and (exclusive) the upper bound. So to get a number between 1 and 52, you have specify arguments of 1 and 53 to the method.
2. When I select a card for the computer and the player, I reduce the result by one. This doesn't affect the comparison but I I did it so there would then be a direct mapping between the cards array (zero based) and the selected card.
So, the program does in fact work fine :)
Prime bRank #2,035 · 712 reputationPosted Jan 12, 2012, 10:28 AM EST
But the only problem that i still have is that I want to make it look like this http://imageshack.us/f/10/50156655.png/
I imagine that I have to add another array, but after that i am lost
And then I can work on the GUI part
VulpesRank #55 · 29.2K reputationPosted Jan 13, 2012, 4:05 AM EST
You'll also need to pass the suit back from the SelectCard() method - you can use an 'out' parameter for this.
So, it's not difficult to alter it so it looks like the image.
I've also made it now so that you have to press a key to see the next deal:
Prime bRank #2,035 · 712 reputationPosted Jan 13, 2012, 6:24 AM EST
I uninstall all my video games.....Selling my expensive video card, downloaded more books in C sharp. Otherwise I wont practice programming, and to be honest I am not sure if I like programming. If you ask me to go play video games I will do that right away, but if you ask me to program i will procrastinate. Its either addiction to video games or its just i like video games more than programming.
VulpesRank #55 · 29.2K reputationPosted Jan 13, 2012, 6:37 AM EST
Prime bRank #2,035 · 712 reputationPosted Jan 13, 2012, 7:00 AM EST
VulpesRank #55 · 29.2K reputationPosted Jan 13, 2012, 7:13 AM EST
Prime bRank #2,035 · 712 reputationPosted Jan 13, 2012, 7:45 AM EST
VulpesRank #55 · 29.2K reputationPosted Jan 13, 2012, 7:54 AM EST
Prime bRank #2,035 · 712 reputationPosted Jan 13, 2012, 8:07 AM EST
So if num is 3 its going to be (3-1) % 4 = 2/4 which = 1/2? why in your case its 2? or it doesnt work that way, Its going to be just 2 which will be hearts
If the number is 14 its going to be (14-1) % 4 = 13 % 4 which is 3 and remainder is 1 which is diamonds?
So if the divisor is greater than dividend then answer will be dividend?
VulpesRank #55 · 29.2K reputationPosted Jan 13, 2012, 8:47 AM EST
Prime bRank #2,035 · 712 reputationPosted Jan 13, 2012, 10:30 AM EST
0 represent clubs, 1 diamonds , 2 hearts, and 3 spades? so if the numbers is 13 it will be 13-1/4 = 3 which is spades?
VulpesRank #55 · 29.2K reputationPosted Jan 13, 2012, 11:23 AM EST
So, (13 -1) % 4 = 0 which is clubs.
(16 - 1) % 4 = 3 would be spades.
Prime bRank #2,035 · 712 reputationPosted Jan 13, 2012, 12:26 PM EST