I'm developing a card game.
All the Graphics are being painted by paint() method ..
The method should paint the Actual Player cards, wait for couple of seconds, then paints the Artificial Player cards ...
I tried to insert this piece of code in order to get the delay between the moves :
Code:draw_actual_player_cards; if(artificial_player_turn==1){ for (int i=0 ; i<10000000; ++i); draw_artificial_player_cards;}
The problem now is that the delay always take effect for both ( draw_actual_player_cards and draw_artificial_player_cards).
Thats let assume the the delay lenght = x ..
Then x time will pass then both paintings are displayed on the same time.
While what I want is :
the actual player cards are displayed -> delay of x -> the artificial payed cards are displayed
So how can I adjust the code so i get proper display order with the desired delay??

Reply With Quote

