C#五子棋游戏的设计与实现 摘 要:五子棋起源于四千多年前的尧帝时期,其规则简单易学,富有趣味,不仅能增强思文能力,提高智力,而且有助于修身养性。本课题采用C#语言在Windows Form窗体上实现了一个小型的五子棋游戏软件,其功能表现为人人对战、人机对战,通过两个玩家的操作,能判输赢,并对五子棋的人人对战、人机对战两种模式作了一定的学习和研究。本文还简述了软件实现所需的技术基础,包括Windows Form窗体应用程序开发、C#编程等,并着重阐述了该游戏软件的设计方法、功能实现及主要算法等。
关键词:五子棋;C#;计算机博弈
Design and Implementation of Gobang Game
Abstract:Gobang which originated from Emperor Yao period of 4000 years ago,with simple and easy game rules as well as full of fun, not only can strengthen people’s critical thinking skills and improve their intelligence, but also can cultivate the moral character and nourish the nature. This paper will enforce software of mini-type five-in-a-row game on the Windows Form by adopting C# language, which functions like that people play against each other or against machines and afterwards the winner will be selected through these two players’ operation. In addition, this paper will make some further and professional study on these two modes. Finally, this thesis will sketch technological bases for performing this software, including Windows Form application program development,C# programming and so on. The design method, function realization and main arithmetic for this game software will be highlighted elaborately.
Key Words:Gobang; C#; Artificial intelligence Computer Game
目 录
摘 要 1
关键词 1
引 言 2
1 绪论 2
1.1 五子棋研究内容 2
1.2 五子棋游戏开发意义 2
1.3 使用的相关技术 3
2 五子棋系统设计 4
2.1 流程图 4
2.2 流程图说明 4
2.3 功能说明 5
2.4 需求分析 5
3 功能模块 6
3.1 下棋控制模块 6
3.2 盘面分析填写棋型表 6
3.3 对方下子 6
3.4 胜负判断 7
4 软件测试 7
4.1软件测试的定义 7
4.2 界面测试 7
4.3 数据的测试 8
4.4 用户验收测试 8
4 总结 8
参考文献 10
致谢 11,3307