基于Python的网络中国象棋游戏设计与实现 摘要中国象棋是一种家喻户晓的棋类游戏,随着互联网时代的到来,人们的娱乐方式也逐渐向PC端和移动端上发展。本文将传统的中国象棋游戏和当下的互联网技术结合作为重点,围绕基于UDP的SOCKET编程实现网上双人对战游戏进行阐述。网络中国象棋采用C/S架构,分为服务器端和客户端,在进行游戏时,服务器端首先启动,当客户端成功连接服务器端后即可走棋;
在服务器端和客户端中,又分为三个部分,分别是局面表示,走法生成和建立连接三大部分,分别实现游戏的各个功能,本文采用了Python语言,充分发挥了其易读易维护,清晰化一的语言风格,开发出功能完善界,界面美观的中国象棋游戏。
关键词网络中国象棋游戏;
Python;
socket Design and Implementation of Online Chinese Chess Game Based on Python AbstractChinese chess is a well-known chess game. With the advent of the Internet era, peoples entertainment has gradually evolved toward the PC and mobile. This article focuses on the combination of traditional Chinese chess games and current Internet technologies. The online double-play game is implemented around the UDP-based SOCKET programming.Network Chinese Chess adopts C/S architecture and is divided into server and c