Time delay problem for project

Click For Summary
SUMMARY

The discussion centers on implementing a time delay in a blackjack game project to control the card dealing sequence. The user is experiencing issues with the card dealing process, where all cards are dealt simultaneously instead of sequentially with delays. Attempts to use loops, sleep functions, and manual delays have not produced the desired effect. The solution requires a structured approach to manage asynchronous operations in the programming language being used.

PREREQUISITES
  • Understanding of asynchronous programming concepts
  • Familiarity with the programming language used for the blackjack game (e.g., JavaScript, Python)
  • Knowledge of event handling and timing functions (e.g., setTimeout in JavaScript)
  • Basic understanding of game development principles
NEXT STEPS
  • Research asynchronous programming techniques in the chosen language
  • Learn about timing functions such as setTimeout in JavaScript or time.sleep in Python
  • Explore state management for sequential actions in game development
  • Investigate event-driven programming to handle user interactions effectively
USEFUL FOR

Game developers, programmers working on interactive applications, and anyone looking to implement timed sequences in their projects.

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.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
Replies
1
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 11 ·
Replies
11
Views
7K
  • · Replies 6 ·
Replies
6
Views
4K
Replies
10
Views
3K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
2K