开发者

Java multiplayer card game AI integration

I have developed a Multi-player Client/Server Variation of Trumps Card Game using QuickServer library. It works well with 4 human players. But when I finished the AI player, I didn't find a way to integrate it into the server: Should I create a开发者_Python百科 separate thread for each player?

I hope my question is clear. Any suggestions would be highly appreciated.


A server should just be a server. In this case, it updates the clients as to what happened and what happens next.

If it were me, I would have a AIClientPlayer, which gets passed a client, and acts using your fancy AI logic when the client signals it to act.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜