You should be able to put a breakpoint at the start of those subs and when the code gets there look at the call stack to see why.
Printable View
The call stack shows:
CSEE.Form1.BlueHigherRight
CSEE.Form1.WaitForResult
CSEE.Form1.btnHigherAPQ_Click
When I activate the breakpoint, the redundant duplication is gone, but when I remove the breakpoint, the duplication prevails.
Is it possible that the error may prevail within the WaitForResult or btnHigherAPQ_Click subs?
Okay here is the culprit.
When that If is True you know that when it comes to who has guessed right it's a one-or-the-other situation. However (and I know you didn't intend to do this) you don't treat it that way. Let's say it's the blue player's turn. What happens in your code is that If WhosTurn = BluePlayer Then is true so BlueHigherRight is executed. In the next If however If WhosTurn = RedPlayer Then is false so BlueHigherRight is executed again! The following will fix that.Code:If (Val(txtGuess.Text) < ans(CurrentQ)) And PlayerAnswer = Higher Then
If WhosTurn = BluePlayer Then
BlueHigherRight
Else
RedHigherRight
End If
If WhosTurn = RedPlayer Then
RedHigherRight
Else
BlueHigherRight
End If
Note that since it's a one-or-the-other situation so if it's Blue it's Blue and if not it's Red, so you don't need to check twice.Code:If (Val(txtGuess.Text) < ans(CurrentQ)) And PlayerAnswer = Higher Then
If WhosTurn = BluePlayer Then
BlueHigherRight
Else
RedHigherRight
End If
Works perfectly now. Thanks! :)
Now, it's on to Phase 2 of the form, the card playing. I'll return to this thread if I need any further assistance.
Some other things.
Your form needs to be at least as wide as Picture1, so you should change the form's Width to 14895, otherwise the right side of the image is cut off.
Let me ask again; why do you need both lblDialog(0) and lblDialog(1)? Why not just lblDialog?
I'm not asking you to change this now but normal control naming conventions use the prefix of the control's name to indicate what type of control it is, so rather than name an image btnHigherAPQ which someone might think was an actual command button, I would name it imgHigherAPQ. However, did you know that you could replace that image with an actual command button (that you might call cmdHigherAPQ :) ), set the buttons Style to Graphical, blank out its Caption and set its Picture to the proper bitmap and you have an actual button that can be clicked?
To allow for a shadow effect.Quote:
Originally Posted by MartinLiss
As for changing the button style to graphical, I will give that a try.
I never noticed that:blush: Here is something that you might want to do. Add the following sub
which can be used like this.Code:Public Sub SetDialog(strCaption)
lblDialog(0).Caption = strCaption
lblDialog(1).Caption = strCaption
End Sub
Code:SetDialog "The cards are being dealt out for Round One, and the red player will be playing the top row while the blue player will be playing the bottom row."
Just tried it, and it works perfectly. Thanks!
Now, I asked a while back about why the wrong audio clip plays and sometimes when I call a card higher, and the next card was higher, but it registered the "HigherWrongCards" sub instead of the "HigherRightCards" sub (see this post for reference).
Although the caption picks up the recorded base card back to where that player started, the next card predicted would work from the most recent card revealed (maybe it's a CurImage issue?) instead of from the base card. I discovered that, when a contestant makes a mistake, all the cards (except for the base card or the card where the contestant froze on) are expected to be cleared (as with the RemoveCards sub), but the cards are not cleared for some strange reason. Here is a piece of code I have:
Is there a better way for me to clear the cards without having to use AutoRedraw or PaintPicture?Code:Private Sub RemoveCards()
Dim i As Integer
contBkgd(1).AutoRedraw = True
For i = CurrentSlot To (FreezeCard(WhosTurn) + 1) Step -1
CurrentSlot = i
contBkgd(1).PaintPicture LoadPicture(App.Path & "\Card Sharks Images\high-lowboard.jpg") _
, CurImage.Left, CurImage.Top, CurImage.Width, CurImage.Height _
, CurImage.Left, CurImage.Top, CurImage.Width, CurImage.Height, vbSrcCopy
Next
contBkgd(1).AutoRedraw = False
contBkgd(1).Refresh
WhosTurn = WhosTurn Xor 1
End Sub
Please send me a new set of files. I don't know what I did but the set I have goes off into never-never land after I make my highr/lower choice. BTW I just noticed that the last two sets of files you sent didn't include the Card Sharks Images folder.
That's because there is a new folder to replace the "Card Sharks Images" folder - it's in a folder named "cards". I'm sorry I forgot to edit the code to reflect the newer folder replacing the "Card Sharks Images" folder.
New folder is being uploaded now and will be delivered momentarily. :)
And what do you mean by "never-never land"?
I mean that the program just stops even though form1 is still displayed.
I sent you the latest update. :)
Before I get to the problem I'd like to mention a few things I noticed.
You can safely remove the Debug.Print "Procedure... line in Form_Load.
You can change
toCode:If oldCardValue < i Then
oldCardValue = i
HigherRightCards
ElseIf oldCardValue > i Then
HigherWrongCards
ElseIf oldCardValue = i Then
HigherWrongCards
End If
and similarly in other places in your code.Code:If oldCardValue < i Then
oldCardValue = i
HigherRightCards
Else
HigherWrongCards
End If
The "You can change it if you want to" sound clip seems to have an extra sylable at the end. It sounds like "You can change it if you want to it"
When I select the "CHANGE" 'button' nothing happens.
Form1d should have a non-default caption.
The positioning of controls like RDNumber are misplaced.
Okay now about the problem...
The 1st card that was dealt in my test was the 5c. I guessed higher and the 9h was the next card. The AnswerHigherCards sub was of course then executed but when it got there I find that I don't understand your code. You first set i to CurrentSlot which gives it a value of 1. (You also give j a value but you don't seem to use it.) You then however change i via the DealCard function to 7. Why is 9h = 7? When the sub is entered oldCardValue = 3. Why is that?
Done.
Done.Quote:
Originally Posted by MartinLiss
Will be fixed.Quote:
Originally Posted by MartinLiss
That's because I am doing the coding step-by-step. The change button code will be added soon.Quote:
Originally Posted by MartinLiss
Fixed.Quote:
Originally Posted by MartinLiss
Actually, the first question is supposed to be answered by the red player (RDNumber displayed), and the second question is supposed to be answered by the blue player (BLNumber displayed), and the 3rd question answered by the red player, and so forth. At least for Round One.Quote:
Originally Posted by MartinLiss
I am so sorry, but I did a last minute stab at editing one of the subs. You can delete that sub that contains the error for now.Quote:
Originally Posted by MartinLiss
That problem was made today, but I was trying to fix the problem myself, but to no avail. In the remove cards sub, you can replace the code on the form I sent you with the one I supplied in Post #128 and see what happens.
When I said that "The positioning of controls like RDNumber are misplaced", what I meant was that when the numbers show up on the form parts of them are cut off.
I added the ChangeCard sub and activated the btnChangeCd to allow for the card to be changed when prompted.
As for the audio clip with an unnecessary "it" at the end, it hasn't been clipped out as yet, but will be soon. The other tasks you suggested are now done.
I am uploading the current folder and will be on the way.
You mean the tops of the numbers?
If so, that's the way the font came originally when I downloaded it. It's called SportsType, and was used in many game shows (currently only featured on certain games on The Price is Right - like Dice Game and Contestant's Row, to name two - only difference is, they appeared slightly tilted on certain game shows).
BTW, are there any sites where I could download free programs that I can create fonts?
The bottom actually. Look at the zero. Also should there be spade and a diamond in the lower corners of the board?
Oh, thanks for clarifying! I apparently used SportsType font on my side, but you probably use Arial on your side.
And I learned from user Technorobbo about the AddFontResource in the code for the Blockbusters game I was working on last year. I didn't get the opportunity to add this to my code, so I shall try the same for the Card Sharks game.
An updated folder will be delivered later on.
Yes, it defaults to Arial, style bold, size 48 for me.
Did you receive the latest delivery?
Yes, I always read my PMs but I just got home.
I've looked at the code and I have to ask, is the code you sent the most current? I ask because while the font has been changed you said you changed the form's caption but it's still the default. Also code like the following that you have in 3 places is still unchanged. I also still have the same questions that I asked previously about the AnswerHigherCards sub and in order for me to help you I need to understand what's going on there and if it's correct.
Code:If oldCardValue < i Then
oldCardValue = i
HigherRightCards
ElseIf oldCardValue > i Then
HigherWrongCards
ElseIf oldCardValue = i Then
HigherWrongCards
End If
How did CurrentSlot get a value of 1? Isn't it supposed to get a value of 0?Quote:
Originally Posted by MartinLiss
And this changing of i via DealCard function to 7 and the oldCardValue = 3 as a result of entering the sub was a mistake on my part. I admit I was randomly manipulating the code a bit to see if I could figure out the problem. Guess I should leave it to you to help me out, as I don't even have a full year's experience with Visual Basic. I learn a lot from you.
And I thought the code I sent you was updated, but I guess where the tweaking occurred in subs I didn't save each change each time it was done. The code is now edited and a new one will be sent.
Okay, after taking a few days break, I decided to continue with the project since I have nothing better to do.
I actually found something when I hovered over this line of code:
The red bolded items indicates the OldSlot integer. If the players next card result is recorded from the result of the old slot of the last card revealed on that row, when it should start from the first card and not the last card revealed on the row (the card that is revealed when a player makes a mistake on the row).Code:i = DealCard(CurImage, 0)
Maybe you should look into possibly finding the error on the DealCard Private Function area:
I will clarify that all I wanted to have done was to clear not just the cards but also their corresponding card values as well (except for the first card on the row, or whatever card he/she froze on). There is a way to do it.Code:Private Function DealCard(Ctrl As Control, OldSlot As Integer) As Integer
Dim i As Integer, X As Integer
i = CurrentSlot
Do While rand(currentCard) > 51
currentCard = currentCard + 1
If currentCard > 53 Then Shuffle
Loop
Ctrl.Picture = cards(rand(currentCard))
Picture1.AutoRedraw = True
Picture1.PaintPicture Ctrl.Picture, Ctrl.Left, Ctrl.Top
Picture1.AutoRedraw = False
Ctrl.Tag = rand(currentCard)
currentCard = currentCard + 1
If currentCard > 51 Then Shuffle
Me.Refresh
DealCard = Ctrl.Tag Mod 13
End Function
In the meantime, I will be adding the FreezePlay code very soon and I will send an updated copy to Martin at some point later today. :)
"If the players next card result is recorded from the result of the old slot of the last card revealed on that row, when it should start from the first card and not the last card revealed on the row (the card that is revealed when a player makes a mistake on the row)."
Could you reword that please? As it is I don't understand it. Perhaps an example would also help.
Just to refresh:
1. The red player guesses a number on the question
2. The blue player guesses higher
3. The blue player wins the question, and has first play of the cards
4. The blue player starts with a 3.
5. The blue player calls that next card lower (intentionally, due to testing).
6. The next card is a Jack and a buzzer sounds.
7. The second question is in play.
8. After the second question is done, the blue player has a turn at the cards.
9. The blue player is supposed to start with the card value of a 3.
10. The blue player calls the next card higher than the 3.
11. Although the 3 is the base card value, and the Jack is the most recently revealed card on the blue row, the next card works from the Jack (which should be removed) instead of the 3.
12. Although the blue player called the card higher than the 3, the next card appears to be higher (it would be a 9, for example).
13. But since the last recorded reveal card value (the Jack) was not cleared, the Jack stayed in place since before the second question, and the HigherWrongCards sub was set off since the last card result that shouldn't exist, the next card result was recorded as lower than the Jack instead of higher than the 3.
And the problem may lie in the code I provided in Post #146. I know it seems hard to understand, but I'm sure it will be figured out sooner or later.
I'll check into it tomorrow assuming I have a new set of "clean" code from you.
I am in the process of cleaning up the code, and it will take a little while (though not as long as we think). I printed off the code by copying/pasting it onto a Word Document and using a printer, and I examined the code for possible redundancies. Some redundancies are eliminated, and some are moved into an Overflow.frm file (which will not be included in the next delivery, as it's a temporary storage form). It may be late tomorrow afternoon or early Tuesday morning before an updated "clean" version will be delivered, as I have to go through the code little by little a few times over.
But it was great for me to learn how to randomize audio files today. :)
I know what I said in my PM and you really should compile the code but I went ahead and looked at the card-skipping problem. I think it's actually working correctly.
Let's talk about your Shuffle sub. You have two of them and you should replace the one in GameEssentials with the one that is now in the form. Also, and this is important to understand why I don't think you have a problem, change the Debug.Print part of that sub to this
That will show you the names of the cards in the "deck". I looked at the names and when a player makes a mistake it seems to me that the cards for the other player start in the right place and show up in the proper order. If not then could you make another video and explain again what is wrong?Code:Private Sub Shuffle()
Dim X As Integer, i As Integer, j As Integer
'load the deck
For i = 0 To 51
rand(i) = i
Next
Randomize
'shuffle
For i = 0 To 51
X = Int(Rnd() * 51) + 1
j = rand(i)
rand(i) = rand(X)
rand(X) = j
' Debug.Print rand(i) & " ";
Next
For i = 0 To 51
Debug.Print NameCard(rand(i))
Next
End Sub
Actually, something came to my mind when I was figuring out why a mistake would be made with the cards by the player, and goes back to the base card value (or whatever value of the card he/she froze from), and then the card result would be recorded from the last card revealed when it should be from the base card value or frozen card value.
It may have to do with the SeqControl. You see, on the bottom of the VB screen, there should be an area that shows a string of numbers listed out of sequence (hence why the cards are shuffled). If you move the scroll bar in that bottom window up to the top, you will see the first shuffle results (or the only shuffle result).
In order to have the right card in the sequence and to allow the card to record from the current base card value, there would have to be some skipping of numeric card labels (ranging from 0 to 51).
Say, if the following sequence:
This is probably for two decks of cards, if I remember correctly (seeing that every second card is for the . There could be skipping involved, but now I realize that there needs to be two decks of cards (one for the red player and one for the blue player).Code:34 14 33 17 32 0 46 29 17 32 37 29 2 42 18 14 44 36 44 27 24 13 22 47 17 44 2 19 7 39 47 48 22 0 45 47 8 28 4 30 33 1 7 46 37 35 47 15 33 16 32 51
I noticed that the "34" (the first card on the blue row, since the blue player won the question) denotes a certain card value. It is possible that the numbers on the sequence line alternate between the red player and the blue player. But then again, some numbers duplicate, but you might want to look into this SeqControl and see what happens.
If skipping is needed, there may have to be a skippage (in other words, leeway) of 5 cards in the sequence after the second question, and a skippage of 10 cards after the third question, and a skippage of 15 cards after the fourth question (a.k.a. the "sudden death" question, which will be worked on after this problem is fixed). But if a player makes a mistake, the current card value will have to be reset to whatever card value was at the beginning of the row or whatever card the player froze on.
I will try a test run with the code you supplied, and I'll see what results I get. But as for the sequence control, it was just an idea.
Oh, and btw, the Shuffle sub in the GameEssentials module shows cards listed from 0 to 53. That is because it may be required for when the Money Cards end game will be added to the form. There will be Jokers in that deck for the add-on 1986 version of the Car Game (which is already developed, but will also be consolidated to the same form as will the Money Cards). It's just that the Shuffle may have to be renamed "MCShuffle" when this task comes around.
That display is in the "Immediate Window". It actually has very little meaning. Change the Shuffle sub to the way I suggested and you'll see that the cards display in the right order
^ Just did. And I will remember to compile from now on before I send the project and corresponding forms.
I think the problem may be because I have two sources of Shuffle - one in the GameEssentials module, and the other within the form - and such redundancy may have thrown off the code a bit.
Is this the case? If so, I can understand why the code that user technorobbo did for me originally worked well, but my version (which was worked off technorobbo's version) may have been thrown off a bit.
And if this is true, I will definitely try eliminating the Shuffle sub from the GameEssentials module, and see if I get optimum results. I'll return to this thread tomorrow morning and give my feedback on this matter - I have some stuff to take care of away from my PC tonight before I head off to bed.
Remember when we talked about scope? If you put a breakpoint in the GameEssentials Shuffle you'll find it never gets executed because when you call Shuffle, VB will call the local one (the one in the form where you call it).
I still have a hard time understanding scope, but I see what you mean. The problem may have been it retrieved from the Shuffle subs of both the local form and the module. I can see why some numbers in the display window were repeated.
Also, I discovered that "LoadCards" was duplicated in both the local form and the GameEssentials module. I deleted the one in the module as well.
Six weeks of figuring out a big problem, and it may have been all due to duplicated coding.
Bad news...
I went through my email archives just now, and downloaded just now what technorobbo created last spring, and it turns out he did the same error with regards to having an Ace as a base card, and on the second turn, I called it lower than the Ace, and although the result was a 6, it set off the LowerWrongCards token instead of the LowerRightCards token.
I think this may be where resetting the base card to where the first card was revealed or where the player froze on, and skipping in the sequence 5 cards ahead for the second play, 10 cards ahead for the third play, and 15 cards ahead for the fourth play of the round is probably a good idea.
It turns out that the Shuffle sub, although technorobbo's version only has the Shuffle sub in the GameEssentials module and not the form, is not the problem. It may have to do with the sequence of the cards in the display window on the bottom of the screen.
I'll send you what technorobbo did last spring by PM tomorrow and see what can be done with regards to resetting the CurrentCard to the first slot of the freeze card slot, and skipping ahead 5, 10, and 15 cards in the sequence.
Duplicate post due to delay in posting. Removed by JonSea31.
Okay I need some help from you. To debug the "Ace first" error you decribed I did this in shuffle.
Since card 12 is the Ace of Spades, that line should result in the Ace of Spades being the first card in the deck and it does. Proof of that is if I do MsgBox NameCard(rand(0)) I get "Ace of Spades). However the first card that shows up is the Ace of Clubs and I can't figure out why that is.Code:Private Sub Shuffle()
Dim X As Integer, i As Integer, j As Integer
'load the deck
For i = 0 To 51
rand(i) = i
Next
Randomize
'shuffle
For i = 0 To 51
X = Int(Rnd() * 51) + 1
j = rand(i)
rand(i) = rand(X)
rand(X) = j
' Debug.Print rand(i) & " ";
Next
'test
rand(0) = 12
For i = 0 To 51
Debug.Print NameCard(rand(i))
Next
End Sub
BTW even if the wrong ace shows up, if I choose "Lower" the sub that gets executed is, correctly, LowerRightCards.
I see what is wrong with the Ace of Spades. Your sa.bmp which should be a picture of the ace of spades is actually a picture of the ace of clubs. You should check the rest of the pictures to make sure they are right.
So I say again, I don't see any problem with the dealing of the cards.
Innocent mistake on my part. The spade symbol in the center of the Ace of Spades is traditionally larger in size than in other spade cards. That's probably why I forgot about it. I will fix that tomorrow.
And btw, when you got the card (the 6) successfully lower than the Ace, was that on your second play of the red or blue turn?
Maybe you should record the cards revealed on the red or blue row during the first turn on a document and then record the results of the second turn. Try that several times and you may see results.
I just did a test run on technorobbo's version - this time with the debug to show the names of the cards in the display window.
They only reveal the cards in order as they appear in the display window. When a player regains control of the cards, it continues from the last card revealed on the red or blue row and not from the base card.
I wonder if there is a way to manipulate the card sequence so that there can be a resetting of the base card value (or freeze card value) in the sequence, and skipping of the cards that were already revealed when that player already had a turn at the cards? Like the Private Function SeqControl area can be changed to accommodate such resetting and skipping?
Here is some of the code I have that may be manipulated to accommodate such resetting and skipping:
Image1 in this case would be the RCard, and Image2 would be BCard.Code:Private Function SeqControl(i As Integer) As Control
If i < 5 Then
Set SeqControl = Image1(i)
Else
Set SeqControl = Image2(i - 5)
End If
End Function
To allow for resetting to the base card/freeze card value, this is where the "minus" would come into play. And to allow for skipping of cards already used in the deck, this is where an equation with the "+" may come in handy.
I also noticed in technorobbo's form that there is only one deck of cards being shared between the red and blue players. There should be two separate decks - one for the red player, and one for the blue player. What should I do to allow for two decks - one for each player?
You now have a "deck" of cards called rand(). Two have two decks I would
- globally change rand (using the Find Whole Word Only option) to something like BlueCards
- create a second array called RedCards()
- rename Shuffle to ShuffleBlueCards
- create a ShuffleRedCards sub
- you would also need to duplicate and use whatever pointer(s) you have that tell you where you are in the decks, etc.
After that if you still have a "base card" problem, could you please send me new files and a link to a video showing what you mean because I don't understand the problem.
I wonder if there's a way to zoom the video recording to show a close-up of the display window when needed. I have CamStudio that I use to record such videos.
I will send you a fresh updated set of files along with a video upload in the coming days.
It does sound possible that you could make the Video Control to be zoomable???
Maybe if I show where the problem exists in a video demonstration, you folks may be able to see what is wrong with the coding.
And like I said, it is possible it may have to do with the sequence of cards and how there may have to be resetting of the base card or freeze card value, and for second, third, or fourth playings of the cards there may have to be skippings of 5, 10, and 15 cards respectively. It doesn't have to reveal the cards in that exact same order in the sequence as displayed in the display window.
So, ThEiMp, if you can see the problem in the video, are you willing to return to the project and give this a try again?
Well since you are going to have two (I assume) unrelated decks then having CurrentRedSlot and CurrentBlueSlot would be a good idea.
During the past few days, I've been doing a major revamp of the code, and I did add the two decks of cards - one for each coloured player.
I even added the CurrentBlueSlot and the CurrentRedSlot areas as well.
I'm also experimenting with developing the Educated Guess questions (they are general knowledge questions that can allow for answers larger than 99). I am hoping to allow for the following to occur during these questions:
1. To have the digits appear to be typed on the podium (just like on the television screen) digit for digit, from left to right.
2. Also, I will be developing a green banner that will animate and drop towards the contestant podium (not exactly as it would appear on the show, but close enough as it gets).
I also discovered that, when decks of cards are being used for a test run, the first test run is okay - it displays two decks of cards in the display window (the first 52 cards are the red player, the latter 52 cards are the blue player). But when I do a second test run, an additional deck is added to the 2 decks, hence displaying 3 decks of cards instead of 2. This should not be.
Once the revamp is done, I will create a video and upload it to YouTube, and I will provide captions to show what the problem is, and maybe you can determine if it's a sequence issue or not.
Okay.
Okay, I did a test run just after opening the project file, and I can see what is going on.
Doing the first test run after immediately opening the project file means that the cards run more smoothly and the right sub is set off.
Before I played the cards, I copied/pasted the entire card sequence from the display window. The first 52 card values are for the blue deck, and the second set of 52 are for the red deck. Here is the result from the blue player's first play at the cards.
BLUE FIRST PLAY:
Then the result for the red player's free shot at the cards:Code:8 of Hearts = CHANGE TO NEXT CARD
4 of Hearts = CALL LOWER
Queen of Diamonds = LAST CARD RECORDED = SHOULD RESET BACK ONE CARD
8 of Clubs
Jack of Diamonds
4 of Clubs
5 of Spades
7 of Spades
9 of Diamonds
King of Clubs
Ace of Diamonds
2 of Clubs
10 of Clubs
Ace of Spades
2 of Spades
4 of Diamonds
7 of Clubs
6 of Clubs
3 of Diamonds
9 of Spades
6 of Spades
10 of Hearts
3 of Hearts
Jack of Clubs
2 of Diamonds
5 of Hearts
10 of Spades
3 of Spades
King of Hearts
9 of Clubs
Jack of Hearts
7 of Hearts
Jack of Spades
8 of Spades
4 of Spades
6 of Diamonds
8 of Diamonds
3 of Clubs
5 of Diamonds
Ace of Hearts
Queen of Clubs
Ace of Clubs
10 of Diamonds
6 of Hearts
5 of Clubs
King of Diamonds
9 of Hearts
7 of Diamonds
King of Spades
2 of Hearts
Queen of Hearts
Queen of Spades
RED FIRST PLAY:
Continued in next post...Code:9 of Clubs = CALL HIGHER
5 of Clubs = HIGHERWRONGCARDS SUB SET OFF, BASE CARD SHOULD RESET BY STEPPING BACK ONE CARD
2 of Clubs
10 of Hearts
6 of Clubs
3 of Hearts
10 of Clubs
King of Diamonds
4 of Spades
King of Clubs
5 of Diamonds
7 of Clubs
2 of Diamonds
King of Hearts
3 of Spades
2 of Hearts
8 of Spades
2 of Spades
Queen of Diamonds
Queen of Spades
Ace of Diamonds
Ace of Hearts
6 of Diamonds
4 of Hearts
Jack of Spades
8 of Clubs
Jack of Hearts
4 of Clubs
Jack of Clubs
8 of Hearts
Ace of Clubs
3 of Clubs
7 of Spades
6 of Spades
10 of Diamonds
5 of Hearts
7 of Hearts
Jack of Diamonds
9 of Diamonds
10 of Spades
7 of Diamonds
6 of Hearts
9 of Hearts
3 of Diamonds
5 of Spades
Queen of Clubs
9 of Spades
4 of Diamonds
Ace of Spades
8 of Diamonds
Queen of Hearts
King of Spades
Now, the red player wins the second question, and the red player has a shot at the cards. Here is the result from the red player's second play of the cards:
RED SECOND PLAY:
And now, the blue player has a free shot at the cards:Code:9 of Clubs = CHANGE TO 2 OF CLUBS
5 of Clubs = LAST CARD RECORDED, SHOULD BE IGNORED
2 of Clubs = CHANGED FROM THE 9 of CLUBS, CALL LOWER
10 of Hearts = LOWERWRONGCARDS SUB SET OFF = SHOULD BE RESET BACK TO THE 2 OF CLUBS (Line #1 Card Value)
6 of Clubs
3 of Hearts
10 of Clubs
King of Diamonds
4 of Spades
King of Clubs
5 of Diamonds
7 of Clubs
2 of Diamonds
King of Hearts
3 of Spades
2 of Hearts
8 of Spades
2 of Spades
Queen of Diamonds
Queen of Spades
Ace of Diamonds
Ace of Hearts
6 of Diamonds
4 of Hearts
Jack of Spades
8 of Clubs
Jack of Hearts
4 of Clubs
Jack of Clubs
8 of Hearts
Ace of Clubs
3 of Clubs
7 of Spades
6 of Spades
10 of Diamonds
5 of Hearts
7 of Hearts
Jack of Diamonds
9 of Diamonds
10 of Spades
7 of Diamonds
6 of Hearts
9 of Hearts
3 of Diamonds
5 of Spades
Queen of Clubs
9 of Spades
4 of Diamonds
Ace of Spades
8 of Diamonds
Queen of Hearts
King of Spades
BLUE SECOND PLAY:
Maybe the problem all along is that when I keep the project file open and do more than one test run, unnecessary but additional cards or decks accumulate on top of each other and therefore cause the test runs to go haywire. I even discovered 200 card values in the display window at times, in fact!Code:8 of Hearts = CHANGE
4 of Hearts = CURRENT CARD VALUE SHOULD BE RESET HERE = CALL HIGHER, SHOULD GO TO LINE #4 IN SEQUENCE
Queen of Diamonds = LAST CARD RECORDED = SHOULD BE SKIPPED
8 of Clubs = DING SOUND EFFECT PLAYS, CALL HIGHER
Jack of Diamonds = DING SOUND EFFECT PLAYS, CALL LOWER
4 of Clubs
5 of Spades
7 of Spades
9 of Diamonds
King of Clubs
Ace of Diamonds
2 of Clubs
10 of Clubs
Ace of Spades
2 of Spades
4 of Diamonds
7 of Clubs
6 of Clubs
3 of Diamonds
9 of Spades
6 of Spades
10 of Hearts
3 of Hearts
Jack of Clubs
2 of Diamonds
5 of Hearts
10 of Spades
3 of Spades
King of Hearts
9 of Clubs
Jack of Hearts
7 of Hearts
Jack of Spades
8 of Spades
4 of Spades
6 of Diamonds
8 of Diamonds
3 of Clubs
5 of Diamonds
Ace of Hearts
Queen of Clubs
Ace of Clubs
10 of Diamonds
6 of Hearts
5 of Clubs
King of Diamonds
9 of Hearts
7 of Diamonds
King of Spades
2 of Hearts
Queen of Hearts
Queen of Spades
I can see why you haven't had any problems on your side, Marty. And now, I may be starting to see the light. Maybe the sequence should be kept at a maximum of 2 decks of cards per game (total of 104 cards in the display window) for an infinite number of test runs.
I'll send you the updated files tomorrow, as I have another problem to discuss in the morning with regards to the red player winning the first question and revealing the red player's first card of the round, and getting an "Invalid Picture" error as the card is supposed to be revealed.
When you talk about the "display window" do you mean the Immediate Window (the window that pops up if you do ctrl-g)? If so I assume you know that that window does not clear itself and that whatever was generated there by Debug.Print statements or anything else will be appended to. (Anything over 200 lines gets pushed off off the top). You can clear the Immediate window by giving it focus, pressing Ctrl-A, and the delete.
If you are really getting more than two decks generated then put a breakpoint at the first executable line in the sub(s) that create (not shuffle) the deck and look at the Call Stack to see why it gets there more than you want.
Yes, that would be the one.
I don't intend to clear the immediate window. Thanks for reminding.Quote:
Originally Posted by MartinLiss
What sub do I put the breakpoint in? The ShuffleRed(or Blue)Cards sub? The Form_Load sub?Quote:
Originally Posted by MartinLiss
And what I was wondering, I would like for there to be a total of only 104 lines in the display window and nothing beyond during every test run. That's what I am trying to clarify.
In the meantime, an updated folder will be delivered later today so that the "Invalid Picture" error would be resolved.