hi there i am making a card game and have this shuffle method which i call after a hand is played , i was just wondering if it is possible to time the execution of the method as sometimes the next hand is starting but the cards aren't displayed properly i am sure this is because the shuffle hasnt finished , i have added a delay(3000) to the draw loop thought this would be enough but sometimes it isnt cheers for any advice
hi there i am new to using processing just started it in college was wondering how to rotate the pacman in my code below so it turn round when it touches side of the screen . any help would be much appreciated .
int x = 300;
int y = 300;
int speed = 3;
int radius = 100;
float mouth = 3.60;
;
void setup (){
size (600,600);
}
void draw (){
background (0);
fill (255,255,0);
arc(x,y,radius,radius,mouth,8.90);
mouth = mouth + 0.05;
if (mouth > 3.60){
mouth = mouth* -0.01;
}
x = x + speed ;
if (x > 600 || x<0){
speed = speed * -1;
}
}