本文详细介绍了一个windows环境下的局域网四国军棋游戏的设计和实现。该游戏使用Socket编程实现在局域网中的通信;使用windows提供的GDI+图形设备接口实现界面。本游戏采用C/S结构设计,以其中一个玩家作为服务器,其他玩家作为客户机连接到服务器。游戏最终实现了局域网中创建游戏、加入游戏和协同游戏的功能,可以实现在局域网中联机对战的要求。
This paper describes the design and implementation of a windows operating system LAN Siguojunqi game. The game uses the Socket Programming in LAN communication; use windows GDI + graphics device interface to achieve the interface. This game uses the C / S structure design, as a server on one of the players, other players connect to the server as a client. The game has finally realized the LAN create games, join the game and collaborative game, you can achieve the requirements of online gaming in the LAN.
Key words: Siguojunqi game; Online gaming; Socket; GDI+