C++.recording

还未完全完成,只是做个记录 可以参考,切勿复制粘贴(后果自负)

以下为定义在头文件下的函数声明,定义放在了GitHub

还请各位看官有意见建议的都请告诉我,我会尽力改善

#include<iostream>
#include<conio.h>
#include<Windows.h>
using namespace std;
struct medicine
{
	int ID;
	char Name[20];
	int Resume;
	int Weight;
	int Gold;
};
struct blank
{
	int ID;
	int Max_Size;
	int Current_Weight;
	int Current_Goods_Number;
	medicine Medicines[5];
};
struct bag
{
	int Max_Number;
	int Current_Number;
	int Used_Load;
	int Max_Load;
	blank* Blanks;
};
struct hero
{
	char Name[20];
	int Lv;
	int Blood;
	int Max_Blood;
	int Defend;
	int Attack;
	int Key;
	int Money;
	bag Bag;
};
struct monster
{
	char Name[20];
	int Lv;
	int Blood;
	int Defend;
	int Attack;
	int Gold;
};

void buyStuff(hero& superman,medicine medicine);//买东西放进背包
bool pickStuff(hero& superman,medicine medicine);//捡东西放进背包
void initBlank(hero& superman);//给背包空格初始化为0
void initBag(hero& superman);//给背包元素初始化为0
void buyBag(hero& superman);//买一个更大的背包
void openBag(hero& superman);//打开背包
void sortBlank(hero& superman,int value);//
void useStuff(hero& superman,int value);//使用东西
void sprite_Data(hero& superman);//英雄的属性资料显示
void sprite_Data(hero& superman,monster& spider);//英雄的属性资料显示
void get_Hero_Position(int towerMap[5][20][20],int& floor,int& hero_X,int& hero_Y);//获取英雄坐标
int fight(hero *superman,monster spider);//战斗
void upLv(int& s,hero *superman);//升级
void mall(hero& superman);//商店
void sortBag(hero& superman);//整理背包
void hero_Act(int towerMap[5][20][20],int& floor,int& hero_X,int& hero_Y,hero& superman,monster enemy);//英雄的各种行为
void flashMap(int towerMap[5][20][20],int& floor);//打印地图
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值