admin管理员组

文章数量:1533897

2024年3月12日发(作者:)

摘 要

随着科技的进步,计算机已经普及每个家庭,而计算机游戏也随之越来越多,

越来越丰富。网络游戏、单机游戏等休闲游戏让众多人喜欢,而斗地主也受广大

群众的追捧。

本设计以一副牌规则为准,将整个游戏按照发牌,叫牌,拆牌,以及出牌的

流程划分为4个部分,开始时由系统调用发牌函数每人随机分到17张牌,留存

3张底牌,然后电脑AI根据自己手上牌值与牌型结合给定权值决定是否叫三张

底牌当地主。一旦叫牌成功,剩下两玩家就是农民,联合“斗地主”。双方以是

否出完牌来决定胜负。如果地主的20张牌都出完了,则地主一方胜;如果两个

农民中任何一人手中的17张牌出完了,则农民一方胜出。

本论文主要讲述了单机版斗地主的游戏算法的设计,以Visual C++语言编译

的一个应用程序。使用者可以简单方便的实现斗地主游戏。本程序界面友好,操

作简单,比较实用。

本程序在详细设计时不断地修正和完善,经过测试阶段反复调试和验证,最

终形成达到设计要求的可行系统。

关键词:

斗地主;纸牌; Visual C++;游戏核心算法

I

Abstract

With the progress of science and technology, computers have universal every

family, and with more and more computer games, increasingly network game,

LAN game and other casual games for many people like it, but Landlord also affected

by the broad masses in both hands.

This design will be subject to rules of a deck of cards, the entire game in

accordance with the licensing, call, cards, as well as the process is divided into four

ing function is called by the system at the beginning, then 17 cards are

randomly assigned to each person and three cards are also retained. After that, the

computer AI decides whether to call cards based on it's own cards value and the cards

type which all have a particular the call is successful, the remaining two

players is farmers, jointing "Landlords". Whether the two sides finish cards determine

the winner. If the landlord's 20 cards are finished, the landlord side win; If any one of

the two farmers finishes 17 cards , the farmers win.

This paper tells the stand-alone Landlord game algorithm is designed to Visual c

+ + language compiled an application. Users can simple to realize Fight the Landlord

game. This procedure friendly interface, the operation is simple, is more practical.

This procedure in the detailed design constantly correction and perfect when,

after testing phase repeated commissioning and validation, and finally form the

feasible system to meet the design requirements.

Key Words: Fight the landlord; Cards; Visual C++; Game core algorithm

II

本文标签: 游戏设计决定算法