啊,2021年即将过去,
为大家送上一份豪华大礼——小心4.0
唉,本来答应大家要更新枪与子弹的,
但由于最近快期末了,我也没有太多时间
我就只更新了主界面和其他几个东东
比如,窗口大小
话又多了,上代码(对了,仍然要装b_game3.0库)
#undef UNICODE
#undef _UNICODE
#include <iostream>
#include <iomanip>
#include <string>
#include <cstdlib>
#include <ctime>
#include <windows.h>
#include <conio.h>
#include <fstream>
#include <stdio.h>
#include <D:\b_game.h>
using namespace std;
using namespace _game;
//常量
const string yz_ren = "●",
yz_fk = " ",
yz_gw = "◆",
yz_kong = " ",
yz_zd = "¤",
yz_dc = "[]",
yz_qiang = "⊕",
yz_dy = "※";
const long long dts = 4,
gws = 2,
dcs = 3,
ys_ren = 249,
ys_fk = 0,
ys_gw = 244,
ys_kong = 240,
ys_zd = 249,
ys_dc = 249;
const short dt[dts + 1][41][41] = {
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
}
};
//变量
long long dtbh, ksd = 3, wj_dcs = 0;
bool cx_flag = 1, yxjx = 0;
struct wp
{
long long h, l;
void csh()
{
h = rand() % 40 + 1;
l = rand() % 40 + 1;
while (dt[dtbh][h][l] != 0)
{
h = rand() % 40 + 1;
l = rand() % 40 + 1;
}
return;
}
};
struct ren : wp
{
}wj;
struct dc : wp
{
bool f = 1;
void csh()
{
f = 1;
h = rand() % 40 + 1;
l = rand() % 40 + 1;
while (dt[dtbh][h][l] != 0)
{
h = rand() % 40 + 1;
l = rand() % 40 + 1;
}
return;
}
}dc[dcs + 1];
struct zd : wp
{
}zd;
struct gw : wp
{
short fx, dh[5] = { 0,-1,1,0,0 }, dl[5] = { 0,0,0,-1,1 }, f = 0;
void csh()
{
h = rand() % 40 + 1;
l = rand() % 40 + 1;
while (dt[dtbh][h][l] != 0)
{
h = rand() % 40 + 1;
l = rand() % 40 + 1;
}
return;
}
void xz()
{
long long dh[5] = { 0,-1,1,0,0 }, dl[5] = { 0,0,0,-1,1 };
for (long long i = 1; i <= 4; i++)
{
long long hh = h, ll = l;
while (dt[dtbh][hh][ll] != 1)
{
if (hh == wj.h && ll == wj.l)
{
fx = i;
f = 1;
break;
}
hh += dh[i];
ll += dl[i];
}
}
if (f)
{
if (dt[dtbh][h + dh[fx]][l + dl[fx]] == 1)
{
f = 0;
}
else
{
h += dh[fx], l += dl[fx];
}
}
else
{
long long t;
t = rand() % 4 + 1;
while (dt[dtbh][h + dh[t]][l + dl[t]] == 1)t = rand() % 4 + 1;
h += dh[t];
l += dl[t];
}
}
}gw[gws + 1];
//基础组件
void csh();
void out();
void in();
void bd();
//界面函数
void zjm();
void tcjm();
void smjm();
void czsmjm();
void swsmjm();
void mbsmjm();
//模式函数
void yxms();
int main()
{
srand(time(0));
yanse(240);
system("cls");
gckdx(12, 26);
system("title 小心");
ycbj();
ycgb();
cout << "正在加载...";
//
system("cls");
ydgb(1, 1);
while (cx_flag)
{
zjm();
}
tcjm();
return 0;
}
void mbsmjm()
{
yanse(15);
system("cls");
gs(0, 0, "游戏背景:");
gs(1, 4, "你到一幢废弃大楼里探险");
gs(1, 4, "太黑了,");
gs(1, 4, "你只能看见四周的环境");
gs(2, 0, "游戏目标:");
gs(1, 4, "找到3颗电池,打开大门");
gs(1, 4, "躲避怪物");
gs(2, 0, "按空格继续");
while (!axj(' '));
return;
}
void swsmjm()
{
yanse(15);
system("cls");
yanse(ys_ren);
cout << yz_ren;
yanse(15);
cout << " 玩家\n";
//
yanse(15);
cout << " ";
yanse(15);
cout << " 墙\n";
//
yanse(ys_dc);
cout << yz_dc;
yanse(15);
cout << " 电池\n";
//
yanse(ys_kong);
cout << yz_kong;
yanse(15);
cout << " 空地\n";
//
yanse(ys_zd);
cout << yz_zd;
yanse(15);
cout << " 出口\n";
//
yanse(ys_gw);
cout << yz_gw;
yanse(15);
cout << " 怪物\n";
//
gs(1, 0, "按空格继续");
while (!axj(' '));
return;
}
void czsmjm()
{
yanse(15);
system("cls");
gs(1, 0, "移动:");
gs(1, 4, " W ");
gs(1, 4, "A S D");
gs(2, 0, "按空格继续");
while (!axj(' '));
return;
}
void smjm()
{
yanse(15);
system("cls");
Sleep(100);
anniu an_0, an_1, an_2, an_3;
an_0.csh(2, 10, 2, 14, "退出", 15, 240);
an_1.csh(4, 10, 4, 18, "操作说明", 15, 240);
an_2.csh(6, 10, 6, 18, "事物说明", 15, 240);
an_3.csh(8, 10, 8, 18, "游戏目标", 15, 240);
while (1)
{
if (an_0.gx_ax())
{
yanse(15);
system("cls");
return;
}
else
{
if (an_1.gx_ax())
{
czsmjm();
yanse(15);
system("cls");
}
else
{
if (an_2.gx_ax())
{
swsmjm();
yanse(15);
system("cls");
}
else
{
if (an_3.gx_ax())
{
mbsmjm();
yanse(15);
system("cls");
}
}
}
}
}
return;
}
void tcjm()
{
yanse(15);
system("cls");
gs(0, 0, " ========= ========= ");
gs(1, 0, " = = = ");
gs(1, 0, " ========= = = = ");
gs(1, 0, " = = = = = = ");
gs(1, 0, " ========= = = = ");
gs(1, 0, " = = = = = = ");
gs(1, 0, "============== = = ");
gs(1, 0, " = = = = ");
gs(1, 0, " = = = = =");
gs(1, 0, " = == = =====");
gs(1, 0, " ");
gs(1, 0, "按空格结束");
while (!axj(' '));
return;
}
void zjm()
{
yanse(15);
system("cls");
gs(1, 10, "小心");
anniu an_0, an_1, an_2;
an_0.csh(4, 11, 4, 15, "退出", 15, 240);
an_1.csh(6, 11, 6, 15, "开始", 15, 240);
an_2.csh(8, 11, 8, 15, "说明", 15, 240);
while (1)
{
if (an_0.gx_ax())
{
cx_flag = 0;
return;
}
else
{
if (an_1.gx_ax())
{
yxjx = 1;
yxms();
break;
}
else
{
if (an_2.gx_ax())
{
smjm();
break;
}
}
}
}
return;
}
void yxms()
{
yanse(15);
system("cls");
csh();
for (long long i = 1; yxjx; i++)
{
long long time_ = clock();
if (i % 1 == 0)in();
if (i % 1 == 0)out();
if (i % 1 == 0)bd();
if (yxjx == 0)return;
if (i % 1 == 0)out();
for (long long j = 1; j <= gws; j++)
{
if (i % 2 == 0)
gw[j].xz();
else
break;
}
if (i % 2 == 0)bd();
if (yxjx == 0)return;
if (150 - (clock() - time_) > 0)
Sleep(150 - (clock() - time_));
yanse(7);
}
return;
}
void csh()
{
dtbh = rand() % dts + 1;
wj.csh();
zd.csh();
for (long long i = 1; i <= gws; i++)
gw[i].csh();
for (long long i = 1; i <= dcs; i++)
dc[i].csh();
wj_dcs = 0;
return;
}
void out()
{
bool flag = 1;
yanse(7);
system("cls");
yanse(7);
ydgb(1, 1);
cout << "生命:" << 1 << " " << "电池数:" << wj_dcs << endl;
yanse(15);
cout << " /--------------\\" << endl;
for (long long i = wj.h - ksd; i <= wj.h + ksd; i++)
{
yanse(15);
cout << " |";
for (long long j = wj.l - ksd; j <= wj.l + ksd; j++)
{
flag = 1;
if (i < 1 || j < 1 || i>40 || j>40)
{
yanse(7);
cout << " ";
flag = 0;
}
else
{
for (long long k = 1; k <= gws; k++)
if (i == gw[k].h && j == gw[k].l)
{
yanse(ys_gw);
cout << yz_gw;
flag = 0;
}
}
if (!flag)
{
continue;
}
for (long long k = 1; k <= dcs; k++)
{
if (i == dc[k].h && j == dc[k].l && dc[k].f)
{
yanse(ys_dc);
cout << yz_dc;
flag = 0;
}
}
if (!flag)
{
continue;
}
if (i == wj.h && j == wj.l)
{
yanse(ys_ren);
cout << yz_ren;
}
else
if (i == zd.h && j == zd.l)
{
yanse(ys_zd);
cout << yz_zd;
}
else
if (dt[dtbh][i][j] == 1)
{
yanse(ys_fk);
cout << yz_fk;
}
else
{
yanse(ys_kong);
cout << yz_kong;
}
}
yanse(15);
cout << "|" << endl;
}
yanse(15);
cout << " \\--------------/";
return;
}
void bd()
{
for (long long i = 1; i <= dcs; i++)
{
if (dc[i].h == wj.h && dc[i].l == wj.l && dc[i].f)
{
dc[i].f = 0;
wj_dcs++;
}
}
for (long long i = 1; i <= gws; i++)
if (wj.h == gw[i].h && wj.l == gw[i].l)
{
yanse(240);
system("cls");
cout << "你输了!!!\n\n\n";
cout << "按Enter继续";
while (_getch() != 13);
yxjx = 0;
system("cls");
return;
}
if (wj.h == zd.h && wj.l == zd.l && wj_dcs == dcs)
{
yanse(240);
system("cls");
cout << "你赢了!!!\n\n\n";
cout << "按Enter继续";
while (_getch() != 13);
yxjx = 0;
system("cls");
return;
}
return;
}
void in()
{
if (axj('A') && wj.l - 1 > 1 && dt[dtbh][wj.h][wj.l - 1] == 0)
{
wj.l--;
}
if (axj('D') && wj.l + 1 < 40 && dt[dtbh][wj.h][wj.l + 1] == 0)
{
wj.l++;
}
if (axj('W') && wj.h - 1 > 1 && dt[dtbh][wj.h - 1][wj.l] == 0)
{
wj.h--;
}
if (axj('S') && wj.h + 1 < 40 && dt[dtbh][wj.h + 1][wj.l] == 0)
{
wj.h++;
}
return;
}
拜拜,明年见!