开发者

how to calculate time interval between player move and AI move

开发者 https://www.devze.com 2022-12-28 15:59 出处:网络
Hii, I want to calculate time taken by the player for making his move. My player can pick his coi开发者_开发知识库n and make his move to a box(like in chess). If my player pick his coin early but make

Hii, I want to calculate time taken by the player for making his move. My player can pick his coi开发者_开发知识库n and make his move to a box(like in chess). If my player pick his coin early but make his move very lately, then how to calculate time between AI and player move


One option is to reset/abort the move action if it is not finished after a certain amount of time, say 5 secs or whatever is reasonable to your game.

0

精彩评论

暂无评论...
验证码 换一张
取 消