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.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jan 11, 2012, 5:56 PM
Prime bPosted Jan 13, 2012, 5:26 PM
VulpesPosted Jan 13, 2012, 4:23 PM
So, (13 -1) % 4 = 0 which is clubs.
(16 - 1) % 4 = 3 would be spades.
Prime bPosted Jan 13, 2012, 3:30 PM
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?
VulpesPosted Jan 13, 2012, 1:47 PM
Prime bPosted Jan 13, 2012, 1:07 PM
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?
VulpesPosted Jan 13, 2012, 12:54 PM
Prime bPosted Jan 13, 2012, 12:45 PM
VulpesPosted Jan 13, 2012, 12:13 PM
Prime bPosted Jan 13, 2012, 12:00 PM
VulpesPosted Jan 13, 2012, 11:37 AM
Prime bPosted Jan 13, 2012, 11:24 AM
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.
VulpesPosted Jan 13, 2012, 9:05 AM
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 bPosted Jan 12, 2012, 3:28 PM
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
VulpesPosted Jan 12, 2012, 4:16 AM
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 bPosted Jan 11, 2012, 9:04 PM
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
Prime bPosted Jan 11, 2012, 6:16 PM
http://www.c-sharpcorner.com/Forums/Thread/156565/who-could-help-me.aspx
Prime bPosted Jan 11, 2012, 6:15 PM