Time delay problem for project

AI Thread Summary
The discussion centers around a project involving the creation of a blackjack game, specifically addressing the issue of implementing a time delay when dealing cards. The user is experiencing a problem where, upon clicking the deal button, both the house and player receive their cards simultaneously without the desired delay. Attempts to create a delay using loops or sleep functions have not produced the intended effect, as the cards are dealt quickly after the initial button click. The user seeks assistance in achieving a sequential dealing process, where a card is dealt to the house, followed by a delay, then a card to the player, and so on. A request for clarification on the programming language being used is made to provide more targeted help.
toobs21
Messages
1
Reaction score
0
Hey, I'm busy doing a project where we have to make the blackjack game. Now my problem is the time delay when they are dealing out the cards. As when we run the game, and click deal we see that both house and player have the cards already.

Tried creatin my own delay with for loop, or using delay or using sleep, and all it does is delay the time between the moment the button was clicked for a few seconds. Then it deals out the cards quickly again.

All i want it to do is when i call the deal() to deal a card to the house, it deals it..delays for a few seconds, then deals to the player...then delays, then deals to the house...back and forth.

Can anyone help? thanx

toobs21
 
Technology news on Phys.org
You'll at least have to tell us what language you're using.
 
Dear Peeps I have posted a few questions about programing on this sectio of the PF forum. I want to ask you veterans how you folks learn program in assembly and about computer architecture for the x86 family. In addition to finish learning C, I am also reading the book From bits to Gates to C and Beyond. In the book, it uses the mini LC3 assembly language. I also have books on assembly programming and computer architecture. The few famous ones i have are Computer Organization and...
I have a quick questions. I am going through a book on C programming on my own. Afterwards, I plan to go through something call data structures and algorithms on my own also in C. I also need to learn C++, Matlab and for personal interest Haskell. For the two topic of data structures and algorithms, I understand there are standard ones across all programming languages. After learning it through C, what would be the biggest issue when trying to implement the same data...
Back
Top