Hi all : )
I'm coding a snake game, now the problem is to get the input from the user
if I used getch(); the snake will wait until she got an input from the user,
so how can I let the snake run normally and expect input in any time to change the snake's direction ?
Thanks : )
Ayaat Monem
-4
Newbie Poster
Recommended Answers
Jump to PostOne way is to use threads. Another way is to use non-standard functions contained in conio.h -- but your compiler may or may not suppport them.
Jump to Postkbhit()?
Jump to Post@OP
Tell us what OS and compiler/IDE you are using so we can stop guessing.
All 10 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
iamthwee
Ayaat Monem
-4
Newbie Poster
sinogoya
-2
Newbie Poster
sinogoya
-2
Newbie Poster
iamthwee
commented:
what the hell is this
-2
iamthwee
Ayaat Monem
-4
Newbie Poster
sinogoya
-2
Newbie Poster
Ayaat Monem
-4
Newbie Poster
sinogoya
-2
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.