客户服务器扑克:使用客户服务器架构和TCP级别网络实现的扑克游戏

  • Q0_878866
    了解作者
  • 22.5KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-06-08 07:56
    上传日期
客户服务器扑克 使用客户端服务器架构和TCP级别网络实现的扑克游戏。 要启动服务器运行 poker_server.py <host> <port> 这将导致服务器等待播放器。 第一个加入的玩家必须使用以下命令开始游戏: poker_client.py start <host> <port> <num> <wallet> <ante> <name> 服务器和此播放器现在都将等待,直到有num_players个播放器。 wallet_amt基本上是在为球员买, ante是玩家必须动手之前付这笔钱的数额, name是玩家的名字。 更多的玩家不需要开始其他游戏,因此他们使用不同的命令。 poker_client.py join <host> <port> <name> 所有玩家加入后,游戏将开始。 关于我们的项目需要注意的重要事情:尽管我们有一个可行的实现,但它不
client-server-poker-main.zip
  • client-server-poker-main
  • .the.swp
    12KB
  • player.py
    11.3KB
  • poker_client.py
    16.4KB
  • .gitignore
    1.8KB
  • README.md
    1.1KB
  • game_state_manager.py
    21.7KB
  • cards.py
    7.1KB
  • poker_server.py
    14.8KB
内容介绍
# client-server-poker A poker game implemented using a client-server architecture and TCP level networking. To start the server run ``` poker_server.py <host> <port> ``` This will cause the server to wait for players. The first player to join must start the game using the command: ``` poker_client.py start <host> <port> <num_players> <wallet_amt> <ante rel='nofollow' onclick='return false;'> <name> ``` Both the server and this player will now wait until there are `num_players` number of players. `wallet_amt` is basically the buy in for players, `ante` is the amount players must ante before hands, `name` is the player's name. Further players do not need to start another game, so they use a different command. ``` poker_client.py join <host> <port> <name> ``` After all players have joined, the game will start. An important thing to note about our project: while we have a working implementation, it is not a full-featured game. We had trouble getting the fold mechanics to work correctly in time for the due date and ultimately had to settle for a fold causing a player to leave the game entirely. In this sense, each run of the server/clients resembles a single hand rather than a full game.
评论
    相关推荐