飞行棋游戏的设计与实现(9)

时间:2026-01-20

9 Is_Fly() 判断棋子是否可以飞行

Private Function Is_Fly(Player_Idx As Long, Plan_Idx As Long) As Boolean '是否可以跳 跃

Is_Fly = False

If GmData.Plan(Player_Idx, Plan_Idx).Idx_Abs = 17 Then Is_Fly = True End If End Function

10 Is_Jump() 判断棋子是否可以跳跃

Private Function Is_Jump(Player_Idx As Long, Plan_Idx As Long) As Boolean '是否可以 跳跃

Is_Jump = False

If GmData.Plan(Player_Idx, Plan_Idx).Idx_Abs < GmData.Trn2Landing And GmData.Plan(Player_Idx, Plan_Idx).Idx_Abs Mod 4 = 1 Then

Is_Jump = True End If End Function

11 IS_Complete() 判断某玩家棋子是否全部胜利

Private Function IS_Complete(Player_Idx As Long, Plan_Idx As Long) As Boolean '是否 全部胜利

IS_Complete = False

If GmData.Plan(Player_Idx, Plan_Idx).Idx_Abs = 55 Then GmData.Plan(Player_Idx, Plan_Idx).Stat = Complete IS_Complete = True End If End Function

12 GetForwardTest() 判断棋子能否走到骰子所示的点数

指定棋子前面的 Range 范围内 安全则返回 Range,否则返回一个小于 Range 的整数。

13 CntFormation() 统计迭子数量

Player_Idx 在 Idx_Rlat 上有多少迭子,返回 1~4 之间的一个整数

Dim Plan As Long, T As Boolean CntFormation = 0 For Plan = 0 To 3

If GmData.Plan(Player_Idx, Plan).Stat = OnTheWay Then

If GmData.Plan(Player_Idx, Plan).Idx_Rlat = Idx_Rlat Then

CntFormation = CntFormation + 1 End If End If Next End Function

Private Function CntFormation(Player_Idx As Long, Idx_Rlat As Long) As Long

14 CntPlanStat()统计某玩家出于某种状态的棋子数量

飞行棋游戏的设计与实现(9).doc 将本文的Word文档下载到电脑

精彩图片

热门精选

大家正在看

× 游客快捷下载通道(下载后可以自由复制和排版)

限时特价:4.9 元/份 原价:20元

支付方式:

开通VIP包月会员 特价:19元/月

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219