开发者

iPhone Deck Game Loop

can anyone tell the best approach to run game loop like Uno or Herats (Deck Game)

[CPU2 turn];
[CPU3 turn];
[User tur开发者_开发问答n]; // Wait to get user input before proceed to [CPU4 turn]
[CPU4 turn];


Perhaps you could make turns into NSOperation subclass instances placed into an NSOperationQueue, which is set to allow only one concurrent turn/operation. In this case, turns are handled in first-in-first-out (FIFO) order. You can read more about this in Apple's Managing Concurrency document.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜