Click here to Skip to main content
15,881,742 members
Home / Discussions / C#
   

C#

 
GeneralRe: Card shuffle program code help needed (code included) Pin
Richard MacCutchan8-Jun-20 21:30
mveRichard MacCutchan8-Jun-20 21:30 
GeneralRe: Card shuffle program code help needed (code included) Pin
Richard Deeming8-Jun-20 0:08
mveRichard Deeming8-Jun-20 0:08 
GeneralRe: Card shuffle program code help needed (code included) Pin
Brian_TheLion8-Jun-20 19:01
Brian_TheLion8-Jun-20 19:01 
GeneralRe: Card shuffle program code help needed (code included) Pin
Richard Deeming8-Jun-20 22:16
mveRichard Deeming8-Jun-20 22:16 
GeneralRe: Card shuffle program code help needed (code included) Pin
Brian_TheLion11-Jun-20 18:20
Brian_TheLion11-Jun-20 18:20 
AnswerRe: Card shuffle program code help needed Pin
OriginalGriff7-Jun-20 4:11
mveOriginalGriff7-Jun-20 4:11 
GeneralRe: Card shuffle program code help needed Pin
Brian_TheLion7-Jun-20 15:37
Brian_TheLion7-Jun-20 15:37 
GeneralRe: Card shuffle program code help needed Pin
OriginalGriff7-Jun-20 20:38
mveOriginalGriff7-Jun-20 20:38 
Brian_TheLion wrote:
I did try stepping through the code but with the way the program is written I can't always get exact values for some of the variables.

Cobblers.
If you can't get "exact values" with the debugger then you are using it wrong - or not using it at all - when you run code in the debugger it is executing your code, so you get to see exactly what you code does when it is running.
If the values you see are not what you expected, then that's a problem with your code, not with the debugger - and that's what the debugger is there for, to help you find the palces where your code isn;t doing what you expected it to.

Shuffling cards is trivial: a very simple way to do it is to put all the cards in an array and use an random number generator to give you two indexes: swap the two cards in those locations. Repeat that at least 5 or 6 times the number of cards involved (52 in a normal pack, so 260 to 312) and the cards are shufffled ...
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!

GeneralRe: Card shuffle program code help needed Pin
Brian_TheLion8-Jun-20 19:12
Brian_TheLion8-Jun-20 19:12 
GeneralRe: Card shuffle program code help needed Pin
F-ES Sitecore9-Jun-20 2:31
professionalF-ES Sitecore9-Jun-20 2:31 
GeneralRe: Card shuffle program code help needed Pin
Brian_TheLion9-Jun-20 19:56
Brian_TheLion9-Jun-20 19:56 
GeneralRe: Card shuffle program code help needed Pin
Brian_TheLion11-Jun-20 18:17
Brian_TheLion11-Jun-20 18:17 
QuestionBest way to store methods in a database? Pin
arnold_w5-Jun-20 22:42
arnold_w5-Jun-20 22:42 
QuestionRe: Best way to store methods in a database? Pin
Richard MacCutchan5-Jun-20 22:58
mveRichard MacCutchan5-Jun-20 22:58 
AnswerRe: Best way to store methods in a database? Pin
arnold_w5-Jun-20 23:56
arnold_w5-Jun-20 23:56 
GeneralRe: Best way to store methods in a database? Pin
Richard MacCutchan6-Jun-20 0:10
mveRichard MacCutchan6-Jun-20 0:10 
GeneralRe: Best way to store methods in a database? Pin
arnold_w6-Jun-20 0:14
arnold_w6-Jun-20 0:14 
AnswerRe: Best way to store methods in a database? Pin
kalberts6-Jun-20 5:22
kalberts6-Jun-20 5:22 
GeneralRe: Best way to store methods in a database? Pin
Richard MacCutchan6-Jun-20 5:26
mveRichard MacCutchan6-Jun-20 5:26 
AnswerRe: Best way to store methods in a database? Pin
Eddy Vluggen5-Jun-20 23:48
professionalEddy Vluggen5-Jun-20 23:48 
AnswerRe: Best way to store methods in a database? Pin
Richard Deeming8-Jun-20 0:05
mveRichard Deeming8-Jun-20 0:05 
GeneralRe: Best way to store methods in a database? Pin
#realJSOP9-Jun-20 23:25
mve#realJSOP9-Jun-20 23:25 
GeneralRe: Best way to store methods in a database? Pin
kalberts10-Jun-20 10:58
kalberts10-Jun-20 10:58 
QuestionMulti programming language Pin
Member 148535394-Jun-20 6:13
Member 148535394-Jun-20 6:13 
AnswerRe: Multi programming language Pin
Richard MacCutchan4-Jun-20 6:15
mveRichard MacCutchan4-Jun-20 6:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.