Which method should I use to give the perception the computer is thinking in programming?

Posted by Roy on Stack Overflow See other posts from Stack Overflow or by Roy
Published on 2010-04-20T07:20:33Z Indexed on 2010/04/20 7:23 UTC
Read the original article Hit count: 213

Filed under:
|

I want to create a simple game like tic tac toe where the human user is playing against the computer. The computer function takes a couple of milliseconds to run but I would like to make the computer take 5 seconds to make a move. Which method should I use?

1) Create two memory threads. One for the computer and one for the human user. When the computer is taking 5 seconds to imitate thinking, the human user thread is paused for 5 seconds.

2) Disable input devices for 5 seconds using timer or dispatchertimer

3) Any better methods you can think of

Thanks!

© Stack Overflow or respective owner

Related posts about c#

Related posts about game-development