Actually , i am making a game in C using graphics.h
game have 2 parts ie. a bucket which is at the bottom which will accept balls coming from the top of screen!!
So game is ball in bucket!
if the co-ordinates of ball lies inside the bucket it means that ball has fallen into the bucket.
I have given 2 option for bucket that is, A and D to shift the bucket on x axis!!
My problem starts here:
In main i have 2 fuctions ie.
position()- which accepts ch=getch() value and checks that is it A or D and move the bucket accordingly!!
And randomizer ()- which can randomly makes circle at random x and y increasing (falling from top).
My problem is how can i achieve that if user doesn't press anything in during ch=getch() then after 1 sec my next line(fuction) of randomizer() will execute!!
I hope you got it!!!