Which method should I use to give the perception the computer is thinking in programming?
- by Roy
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!