C++控制台编程“坦克大战”

新手C++ 坦克大战

本人新手写的比较杂乱,不喜勿喷,

1、首先,先用图片介绍下代码运行逻辑,

代码逻辑

2、这是控制台的界面,展示一下各个功能的界面

开始界面
菜单
单人模式界面
单人模式
双人模式界面
双人模式
自定义地图
自定义地图

3、以下是代码展示

这是菜单类

#include "Menu.h"
#include <windows.h>
#include "Game.h"
//显示欢迎界面
void Menu::Show_Welcome()
{
    Map::Colors(白色);
    Map::WriteChar(2,8,"I -         2600              HI -             20000");
    Map::Colors(紫色);
    Map::WriteChar(5, 10,   "▓▓▓▓▓        ▓       ▓▓▓▓▓  ▓▓▓▓▓  ▓        ▓▓▓▓▓");
    Sleep(100);
    Map::WriteChar(6, 10,   "▓       ▓     ▓  ▓         ▓          ▓      ▓        ▓        ");
    Sleep(100);
    Map::WriteChar(7, 10,   "▓       ▓    ▓    ▓        ▓          ▓      ▓        ▓        ");
    Sleep(100);
    Map::WriteChar(8, 10,   "▓▓▓▓▓    ▓      ▓       ▓          ▓      ▓        ▓▓▓▓▓");
    Sleep(100);
    Map::WriteChar(9, 10,   "▓       ▓  ▓▓▓▓▓▓      ▓          ▓      ▓        ▓        ");
    Sleep(100);
    Map::WriteChar(10, 10,  "▓       ▓  ▓        ▓      ▓          ▓      ▓        ▓        ");
    Sleep(100);
    Map::WriteChar(11, 10,  "▓▓▓▓▓   ▓        ▓      ▓          ▓      ▓▓▓▓  ▓▓▓▓▓");
    Sleep(100);
    Map::WriteChar(13, 14,  "    ▓▓▓▓       ▓▓▓▓▓   ▓▓▓▓▓    ▓      ▓ ");
    Sleep(100);
    Map::WriteChar(14, 14,  "  ▓▓      ▓         ▓           ▓        ▓      ▓ ");
    Sleep(100);
    Map::WriteChar(15, 14,  " ▓▓                  ▓           ▓         ▓    ▓  ");
    Sleep(100);
    Map::WriteChar(16, 14,  "▓                     ▓           ▓          ▓▓▓   ");
    Sleep(100);
    Map::WriteChar(17, 14,  " ▓▓                  ▓           ▓            ▓     ");
    Sleep(100);
    Map::WriteChar(18, 14,  "  ▓▓      ▓         ▓           ▓            ▓     ");
    Sleep(100);
    Map::WriteChar(19, 14,  "    ▓▓▓▓       ▓▓▓▓▓       ▓            ▓     ");
    Sleep(200);
}
//静态菜单信息
void Menu::Show_Menu()
{
    Map::Colors(白色);   
    Map::WriteChar(38,22, "@  1990  1980  NAMCO  LTD.");
    Map::WriteChar(39,24, "ALL RIGHTS  RESERVED");
}
//自定义地图赋值及打印
int tool::Init_Map[41][41];
void tool::Init_Info()
{
    int i,j;
    for (i = 0; i < HIGHT; i++)
    {
        for (j = 0; j < WIDTH; j++)
        {
            Init_Map[41][41];


            //初始化边框
            if (Init_Map[i][j] == 边框)
            {
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN
                    | FOREGROUND_RED | FOREGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_BLUE);
                Map::WriteChar(i, j, "■");
            }

            if (Init_Map[i][j] == 黄土墙)//被击中变成红土墙
            {
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN | FOREGROUND_RED | BACKGROUND_GREEN | BACKGROUND_RED);
                Map::WriteChar(i, j, "▓");
            }
            if (Init_Map[i][j] == 红土墙)
            {
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED | BACKGROUND_GREEN | BACKGROUND_RED);
                Map::WriteChar(i, j, "▓");
            }
            if (Init_Map[i][j] == 水流)
            {
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | BACKGROUND_BLUE | FOREGROUND_BLUE | FOREGROUND_GREEN);
                Map::WriteChar(i, j, "~");
            }
            if (Init_Map[i][j] == 钢墙)
            {
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_GREEN| FOREGROUND_RED | FOREGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_RED | BACKGROUND_BLUE);
                Map::WriteChar(i, j, "■");
            }
            if (Init_Map[i][j] == 老家)
            {
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_BLUE | FOREGROUND_RED | FOREGROUND_GREEN);
                Map::Map::WriteChar(37, 19, "◣★◢");
                Map::WriteChar(38, 19, "███");
                Map::WriteChar(39, 19, "◢█◣");

            }
            Map::Colors(黑色);
        }
    }
}
void tool::menu()
{
    COORD Coord[3];
    const char mu[3][16] =
    {
        "               ",
         "1  PLAYER",
         "2  PLAYERS",
    };
    for (int i = 0; i < 3; i++)
    {
        Coord[i].Y = 24;
    }
    Coord[0].X = 23;
    Coord[1].X = 25;
    Coord[2].X = 27;

    for (int i = 0; i < 3; i++)
    {
        Map::WriteChar(Coord[i].X, Coord[i].Y, mu[i]);
    }
    Map::Colors(绿色);
    Map::WriteChar(Coord[1].X, Coord[1].Y, mu[1]);
    int Select = 1;
    while (1)
    {
        if (GetAsyncKeyState('W') & 0x8001)
        {
            Map::Colors(白色);
            Map::WriteChar(Coord[Select].X, Coord[Select].Y, mu[Select]);
            if (Select == 1)
                Select = 2;
            else
                Select--;
            Map::Colors(绿色);
            Map::WriteChar(Coord[Select].X, Coord[Select].Y, mu[Select]);
        }
        else if (GetAsyncKeyState('S') & 0x8001)
        {
            Map::Colors(白色);
            Map::WriteChar(Coord[Select].X, Coord[Select].Y, mu[Select]);
            if (Select == 2)
                Select = 1;
            else
                Select++;
            Map::Colors(绿色);
            Map::WriteChar(Coord[Select].X, Coord[Select].Y, mu[Select]);
        }
        else if (GetAsyncKeyState(0xD) & 0x8001)//回车键
        {
            switch (Select)
            {
            case 1:Game::play = 1; break;
            case 2:Game::play = 2; break;
            default:
                break;
            }
            return;
        }
        Sleep(200);
    }
}

坦克类

#include "Tank.h"
#include "Map.h"
#pragma comment(lib,"winmm.lib")
//坦克mode模型的三维数组
const char* tank_figure[6][3][4] =
{
    {
    {"█┃ █", "█┳ █", "███", "███"},
    {"█●█", "█●█", "━ ●┫", "┣ ●━"},
    {"█┻ █", "█┃ █", "███", "███"}
  },
  {
    {"◢┃ ◣", "◢━ ◣", "◢┳ ◣", "◢┳ ◣"},
    {"┣ ●┫", "┣ ●┫", "━ ●┃", "┃ ●━"},
    {"◥━ ◤", "◥┃ ◤", "◥┻ ◤", "◥┻ ◤"}
  },
  {
    {"┏ ┃ ┓", "┏ ┳ ┓", "┏ ┳ ┓", "┏ ┳ ┓"},
    {"┣ ●┫", "┣ ●┫", "━ ●┫", "┣ ●━"},
    {"┗ ┻ ┛", "┗ ┃ ┛", "┗ ┻ ┛", "┗ ┻ ┛"}
  },
  {
    {"┏ ┃ ┓", "◢━ ◣", "┏ ┳ ◣", "◢┳ ┓"},
    {"┣ ●┫", "┣ ●┫", "━ ●┃", "┃ ●━"},
    {"◥━ ◤", "┗ ┃ ┛", "┗ ┻ ◤", "◥┻ ┛"}
  },
  {
    {"╔ ┃ ╗", "╔ ╦ ╗", "╔ ╦ ╗", "╔ ╦ ╗"},
    {"╠ █╣", "╠ █╣", "━ █╣", "╠ █━"},
    {"╚ ╩ ╝", "╚ ┃ ╝", "╚ ╩ ╝", "╚ ╩ ╝"}
  },
 {
    {"  ■  ", "■  ■", "  ■■", "■■  "},
    {"■●■", "■●■", "■●  ", "  ●■"},
    {"■  ■", "  ▉  ", "  ■■", "■■  "}
 }
};
//坦克构造
Tank::Tank(COORD pos, DIR dir,int mode,int team)
{
    //坐标
    this->pos = pos;
    //方向
    this->dir = dir;
    //图案模型
    this->mode = mode;
    //阵营
    this->team = team;
    //时间坦克移动
    this->CD = 150;
    this->end_time = clock();
    this->music = clock();
    //坦克分数
    this->score = 0;
    //打印坦克
    Show_Tank();
}
//打印坦克
void Tank::Show_Tank()
{
    const char* (*tankModel)[4] = tank_figure[mode];
    for (int i = 0; i < 3; i++)
    {
        //敌方坦克需要彩色,来区别
        if (team == 3)
        {
            Map::Colors(rand()%7+2);
        }
        else
        {
            Map::Colors(紫色);
        }
        Map::WriteChar(pos.X-1+i,pos.Y-1,tankModel[i][dir]);
        Map::dynamic[pos.X - 1 + i][pos.Y - 1] = 坦克;
        Map::dynamic[pos.X - 1 + i][pos.Y ] = 坦克;
        Map::dynamic[pos.X - 1 + i][pos.Y+1] = 坦克;

    }
}
//清理坦克
void Tank::Clear_Tank()
{
    for (int i = 0; i < 3; i++)
    {        
        Map::WriteChar(pos.X - 1 + i, pos.Y - 1, "      ");
        Map::dynamic[pos.X - 1 + i][pos.Y - 1] = 空地;
        Map::dynamic[pos.X - 1 + i][pos.Y] = 空地;
        Map::dynamic[pos.X - 1 + i][pos.Y + 1] = 空地;
    }
}
//坦克移动
void Tank::Move_Tank(DIR dir)
{
    //移动坦克之前检查CD是否冷却
    if (Check_End_Time())
    {
        //清理坦克
        Clear_Tank();
        //检查方向是否一致
        if (this->dir != dir)
        {
            this->dir = dir;
            Show_Tank();
            return;
        }
        else
        {
            //检查是否可以移动
            if (if_Move_Tank())
            {
                switch (dir)
                {
                case:pos.X--;
                    break;
                case:pos.X++;
                    break;
                case:pos.Y--;
                    break;
                case:pos.Y++;
                    break;
                default:
                    break;
                }
            }
        }
        Show_Tank();
    }
}
//坦克移动判断
bool Tank::if_Move_Tank()
{
    if (dir ==)
    {
        return Collide_Check({ pos.X - 2,pos.Y - 1 }) && Collide_Check({ pos.X - 2,pos.Y }) && Collide_Check({pos.X-2,pos.Y+1});
    }
    if (dir ==)
    {
        return Collide_Check({ pos.X + 2,pos.Y - 1 }) && Collide_Check({ pos.X + 2,pos.Y }) && Collide_Check({ pos.X + 2,pos.Y + 1 });
    }
    if (dir ==)
    {
        return Collide_Check({ pos.X -1,pos.Y - 2 }) && Collide_Check({ pos.X  ,pos.Y -2}) && Collide_Check({ pos.X + 1,pos.Y - 2 });
    }
    if (dir ==)
    {
        return Collide_Check({ pos.X + 1,pos.Y + 2 }) && Collide_Check({ pos.X,pos.Y + 2}) && Collide_Check({ pos.X - 1,pos.Y + 2 });
    }
    return false;
}
//辅助坦克移动判断检测
bool Tank::Collide_Check(COORD pos)
{
    if (Map::static_Map[pos.X][pos.Y] == 空地 && Map::dynamic[pos.X][pos.Y] != 坦克)
    {
        return true;
    }

    return false;
}
//CD检测
bool Tank::Check_End_Time()
{
    if (clock() - end_time > this->CD)
    {
        end_time = clock();
        return true;
    }
    return false;
}
//坦克开火
void Tank::Play_Bullet(std::vector<Bullet*>& bull)
{
    /*if (pos.X == 2)
    {
        return;
    }*/
    Sleep(100);
    //播放发子弹音乐D:ProjectTEST_ONEMusic
    Bullet* bullet = new Bullet(this->pos,this-> dir,this->team);
    bull.push_back(bullet);
        //PlaySoundA("D:\Project\TEST_ONE\Music\boom.wav", NULL, SND_ASYNC | SND_FILENAME);
}

子弹类

#include "Bullet.h"
#include "Game.h"
#include <conio.h>
#pragma comment(lib,"winmm.lib")
//如果子弹遇到水流后loc=1,
int loc;
//子弹类构造函数
Bullet::Bullet(COORD pos,DIR dir,int team)
{
    //子弹坐标初始化
    this->pos = pos;
    //子弹方向初始化
    this->dir = dir;
    //子弹存活
    this->alive = true;

    //子弹阵营
    this->team = team;

    //检查子弹赋值前的地方是否为边框

        if (dir ==)
        {
            if (Map::static_Map[this->pos.X - 2][this->pos.Y] == 边框)
            {

                alive = false;
            }
        }
        else if (dir ==)
        {
            if (Map::static_Map[this->pos.X + 2][this->pos.Y] == 边框)
            {

                alive = false;
            }
        }
        else if (dir ==)
        {
            if (Map::static_Map[this->pos.X][this->pos.Y - 2] == 边框)
            {

                alive = false;

            }
        }
        else if (dir ==)
        {
            if (Map::static_Map[this->pos.X][this->pos.Y + 2] == 边框)
            {

                alive = false;
            }
        }
        if (alive == true)
        {
            if (Gps_Bullet_1())
            {
                switch (dir)
                {
                case:this->pos.X -= 2;
                    break;
                case:this->pos.X += 2;
                    break;
                case:this->pos.Y -= 2;
                    break;
                case:this->pos.Y += 2;
                    break;
                default:
                    break;
                }
                //Show_bullet();
            }

        }

}
//子弹移动
void Bullet::Move()
{    //清理子弹
        Clear_Bullet();
        //检测能否移动
        if (Gps_Bullet())
        {//如果经过水流
            if (loc >= 1)
            {
                for (int x = 0; x < 41; x++)
                {
                    for (size_t i = 0; i < 41; i++)
                    {
                        if (Map::static_Map[x][i] == 水流)
                        {
                            SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | BACKGROUND_BLUE | FOREGROUND_BLUE | FOREGROUND_GREEN);
                            Map::WriteChar(x, i, "~");
                        }
                    }
                }
                loc--;
            }
            switch (dir)
            {
            case:this->pos.X -= 1;
                break;
            case:this->pos.X += 1;
                break;
            case:this->pos.Y -= 1;
                break;
            case:this->pos.Y += 1;
                break;
            default:
                break;
            }
            Show_bullet();
        }
        else
        {
            alive = false;
        }
}
//子弹坐标设置
bool Bullet::Gps_Bullet_1()
{
    if (dir ==)
    {
        return check({ this->pos.X - 2,this->pos.Y });
    }
    if (dir ==)
    {
        return check({ this->pos.X + 2,this->pos.Y });
    }
    if (dir ==)
    {
        return check({ this->pos.X ,this->pos.Y - 2 });
    }
    if (dir ==)
    {
        return check({ this->pos.X ,this->pos.Y + 2 });
    }
    return false;
}
bool Bullet::Gps_Bullet()
{
    if (dir ==)
    {
        return check({ this->pos.X - 1,this->pos.Y });
    }
    if (dir ==)
    {
        return check({ this->pos.X + 1,this->pos.Y });
    }
    if (dir ==)
    {
        return check({ this->pos.X ,this->pos.Y - 1 });
    }
    if (dir ==)
    {
        return check({ this->pos.X ,this->pos.Y + 1 });
    }
    return false;
}
//碰撞检测
bool Bullet::check(COORD pos)
{
    ////播放发子弹音乐D:ProjectTEST_ONEMusic
    //PlaySoundA("D:\Project\TEST_ONE\Music\hit.wav", NULL, SND_ASYNC |SND_NODEFAULT);
    if (Map::static_Map[pos.X][pos.Y] == 老家)
    {
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_INTENSITY);
        Map::WriteChar(37, 19, "◢  ◣");
        Map::WriteChar(38, 19, "  █  ");
        Map::WriteChar(39, 19, "◥  ◤");
        Sleep(1000);
        //清理地图
        Map::Clear_Map();
        //改变标记
        this->Home = false;
        //将标记传入输赢检测
        vin(this->Home);
        //输出老家被毁
        Map::Clear_Map();
        Map::Colors(红色);
        Map::WriteChar(20, 20, "老家被毁");
        Sleep(1000);
        return false;
    }
    if (Map::static_Map[pos.X][pos.Y] == 边框)
    {
        return false;
    }
    if (Map::dynamic[pos.X][pos.Y] == 坦克)
    {    
        //由于判断体较长,所以封装陈函数
        Over_Tank({pos.X,pos.Y});
        //检测输入,看哪一方先死全
        vin();
        return false;
    }
    if (Map::dynamic[pos.X][pos.Y] == 子弹)
    {
        for (int x = 0; x < Game::bull.size(); x++)
        {
            if (Game::bull[x]->pos.X == pos.X && Game::bull[x]->pos.Y == pos.Y)
            {
                Game::bull[x]->Clear_Bullet();
                Game::bull[x]->alive = false;
            }
        }
        return false;
    }
    if (Map::static_Map[pos.X][pos.Y] == 空地 && Map::dynamic[pos.X][pos.Y] == 空地)
    {
        return true;
    }
    else if (Map::static_Map[pos.X][pos.Y] == 黄土墙)
    {
        Map::static_Map[pos.X][pos.Y] = 红土墙;
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY | FOREGROUND_RED | BACKGROUND_GREEN | BACKGROUND_RED);
        Map:: WriteChar(pos.X, pos.Y, "▓");
        return false;
    }
    else if (Map::static_Map[pos.X][pos.Y] == 水流)
    {
        loc = 2;
        return true;
    }
    else if (Map::static_Map[pos.X][pos.Y] == 红土墙)
    {
        if (dir ==|| dir ==)
        {
            if (Map::static_Map[pos.X - 1][pos.Y] == 红土墙)
            {
                Map::static_Map[pos.X - 1][pos.Y] = 空地;
                Map::WriteChar(pos.X - 1, pos.Y, "  ");
            }
            if (Map::static_Map[pos.X + 1][pos.Y] == 红土墙)
            {
                Map::static_Map[pos.X + 1][pos.Y] = 空地;
                Map::WriteChar(pos.X + 1, pos.Y, "  ");
            }
            Map::static_Map[pos.X][pos.Y] = 空地;
            Map::WriteChar(pos.X, pos.Y, "  ");
        }
        if (dir ==|| dir ==)
        {
            if (Map::static_Map[pos.X][pos.Y - 1] == 红土墙)
            {
                Map::static_Map[pos.X][pos.Y - 1] = 空地;
                Map::WriteChar(pos.X, pos.Y - 1, "  ");
            }
            if (Map::static_Map[pos.X][pos.Y + 1] == 红土墙) {
                Map::static_Map[pos.X][pos.Y + 1] = 空地;
                Map::WriteChar(pos.X, pos.Y + 1, "  ");
            }
            Map::static_Map[pos.X][pos.Y] = 空地;
            Map::WriteChar(pos.X, pos.Y, "  ");
        }        
        return false;
    }
    return false;
}
//打印子弹
void Bullet::Show_bullet()
{
    Map::Colors(绿色);
    Map::WriteChar(pos.X, pos.Y, "⊙");
    Map::dynamic[pos.X][pos.Y] = 子弹;
}
//清理子弹
void Bullet::Clear_Bullet()
{
    Sleep(30);
    Map::WriteChar(pos.X,pos.Y,"  ");
    Map::dynamic[pos.X][pos.Y] = 空地;
}
//清理坦克(死亡)
void Bullet::Clear_Tank(COORD pos)
{
    for (int i = 0; i < 3; i++)
    {
        Map::WriteChar(pos.X - 1 + i, pos.Y - 1, "  ");
        Map::WriteChar(pos.X - 1 + i, pos.Y , "  ");
        Map::WriteChar(pos.X - 1 + i, pos.Y + 1, "  ");

        Map::dynamic[pos.X - 1 + i][pos.Y - 1] = 空地;
        Map::dynamic[pos.X - 1 + i][pos.Y] = 空地;
        Map::dynamic[pos.X - 1 + i][pos.Y + 1] = 空地;
    }
}
//坦克得分
void Bullet::Show_Score(int n1,int n2)
{
    if (n1 == 0 && n1 ==0)
    {
        if (team == 1)
        {
            Game::user1->score += 100;
            Map::WriteInt(7, 52, Game::user1->score);
        }
        if (team == 2)
        {
            Game::user2->score += 100;
            Map::WriteInt(10, 52, Game::user2->score);
        }
    }
    if(n1 != 0||n2 !=0)
    {
        system("cls");
        if (Game::play == 1)
        {        
            Map::WriteChar(20, 22, "1P 总得分:");
            Map::WriteInt(20, 28, n1);
            system("pause");
        }
        if (Game::play==2)
        {
            Map::WriteChar(20,22,"1P 总得分:");
            Map::WriteChar(22, 22, "2P 总得分:");
            Map::WriteInt(20, 28, n1);
            Map::WriteInt(22, 28,n2);
            system("pause");
        }
    }
}
//剩余坦克复活次数
void Bullet::Show_Revive()
{
    if (Game::play == 1)
    {
        Map::WriteInt(8, 52, Game::Revive_User1);
    }
    else if (Game::play == 2)
    {
        Map::WriteInt(8, 52, Game::Revive_User1);
        Map::WriteInt(11, 52, Game::Revive_User2);
    }
}
//坦克死亡
bool Bullet::Over_Tank(COORD pos)
{    
    //判断子弹碰到的坦克是AI1,AI2,AI3,user1,user2
    for (int i = 0; i < 3; i++)
    {
        //判断克能AI剩余数为0,对象是否被销毁
        if (Game::AI1 != nullptr)
        {
            if (//如果是AI1
                pos.X == Game::AI1->pos.X - 1 + i && pos.Y == Game::AI1->pos.Y - 1 ||
                pos.X == Game::AI1->pos.X - 1 + i && pos.Y == Game::AI1->pos.Y ||
                pos.X == Game::AI1->pos.X - 1 + i && pos.Y == Game::AI1->pos.Y + 1
                )
            {        //判断击中AI1的子弹是不是同一个阵营
                if (team == Game::AI1->team)
                {//如果是,则直接返回
                    return false;
                }
                else
                {//如果不是就在屏幕上擦除
                    Clear_Tank({ Game::AI1->pos.X, Game::AI1->pos.Y });

                    //让AI1回到起始位置
                    if (Game::AI_Tank_Num > 0)
                    {
                        Show_Score();
                        Game::AI1->mode = rand() % 4 + 2;
                        Game::AI1->pos = { 2,2 };
                        Game::AI_Tank_Num--;
                        Map::WriteChar(5, 51, "    ");
                        Map::WriteInt(5, 52, Game::AI_Tank_Num);
                    }
                    else
                    {
                        Show_Score();
                        delete Game::AI1;
                        Game::AI1 = nullptr;
                    }
                }
            }
        }
        //判断克能AI剩余数为0,对象是否被销毁
        if (Game::AI2 != nullptr)
        {
            if (
                pos.X == Game::AI2->pos.X - 1 + i && pos.Y == Game::AI2->pos.Y - 1 ||
                pos.X == Game::AI2->pos.X - 1 + i && pos.Y == Game::AI2->pos.Y ||
                pos.X == Game::AI2->pos.X - 1 + i && pos.Y == Game::AI2->pos.Y + 1
                )
            {
                if (team == Game::AI2->team)
                {
                    return false;
                }
                else
                {
                    Clear_Tank({ Game::AI2->pos.X, Game::AI2->pos.Y });

                    if (Game::AI_Tank_Num > 0)
                    {
                        Show_Score();
                        Game::AI2->mode = rand() % 4 + 2;
                        Game::AI2->pos.X = 2;
                        Game::AI2->pos.Y = 20;
                        Game::AI_Tank_Num--;
                        Map::WriteChar(5, 52, "    ");
                        Map::WriteInt(5, 52, Game::AI_Tank_Num);
                    }
                    else
                    {
                        Show_Score();
                        delete Game::AI2;
                        Game::AI2 = nullptr;
                    }
                }
            }
        }
        //判断克能AI剩余数为0,对象是否被销毁
        if (Game::AI3 != nullptr)
        {
            if (
                pos.X == Game::AI3->pos.X - 1 + i && pos.Y == Game::AI3->pos.Y - 1 ||
                pos.X == Game::AI3->pos.X - 1 + i && pos.Y == Game::AI3->pos.Y ||
                pos.X == Game::AI3->pos.X - 1 + i && pos.Y == Game::AI3->pos.Y + 1
                )
            {
                if (team == Game::AI3->team)
                {
                    return false;
                }
                else
                {
                    Clear_Tank({ Game::AI3->pos.X, Game::AI3->pos.Y });

                    if (Game::AI_Tank_Num > 0)
                    {
                        Show_Score();
                        Game::AI2->mode = rand() % 4 + 2;
                        Game::AI3->pos.X = 2;
                        Game::AI3->pos.Y = 38;
                        Game::AI_Tank_Num--;
                        Map::WriteChar(5, 52, "         ");
                        Map::WriteInt(50, 52, Game::AI_Tank_Num);
                    }
                    else
                    {
                        Show_Score();
                        delete Game::AI3;
                        Game::AI3 = nullptr;
                    }
                }
            }
        }
        if (Game::user1 != nullptr)
        {
            if (//如果是user1
                pos.X == Game::user1->pos.X - 1 + i && pos.Y == Game::user1->pos.Y - 1 ||
                pos.X == Game::user1->pos.X - 1 + i && pos.Y == Game::user1->pos.Y ||
                pos.X == Game::user1->pos.X - 1 + i && pos.Y == Game::user1->pos.Y + 1
                )
            {        //判断击中AI1的子弹是不是同一个阵营
                if (team == Game::user1->team)
                {//如果是,则直接返回
                    return false;
                }
                else
                {//如果是就在屏幕上擦除
                    Clear_Tank({ Game::user1->pos.X, Game::user1->pos.Y });
                    if (Game::Revive_User1 == 0)
                    {
                        //Show_Score(Game::user1->score);
                        delete Game::user1;
                        Game::user1 = nullptr;
                    }
                    else
                    {
                        Show_Revive();
                        //玩家1复活次数减1
                        Game::Revive_User1--;
                        Show_Revive();
                        //让user1回到起始位置
                        Game::user1->pos = { 38,14 };
                        for (int i = 0; i < 3; i++)
                        {
                            Map::Colors(紫色);
                            Map::WriteChar(37 + i, 13, Map::tank_user1[i]);
                        }
                    }

                }

        }
}
        if (Game::play == 2)
        {
            if (Game::user2 != nullptr)
            {
                if (//如果是user2
                    pos.X == Game::user2->pos.X - 1 + i && pos.Y == Game::user2->pos.Y - 1 ||
                    pos.X == Game::user2->pos.X - 1 + i && pos.Y == Game::user2->pos.Y ||
                    pos.X == Game::user2->pos.X - 1 + i && pos.Y == Game::user2->pos.Y + 1
                    )
                {        //判断击中user2的子弹是不是同一个阵营
                    //由于可能出现玩家死亡,所以不能使用空指针,直接使用值1
                    if (team == Game::user2->team || team==1)
                    {//如果是,则直接返回
                        return false;
                    }
                    else
                    {
                        //如果是就在屏幕上擦除
                        Clear_Tank({ Game::user2->pos.X, Game::user2->pos.Y });
                        if (Game::Revive_User2 == 0)
                        {
                            delete Game::user2;
                            Game::user2 = nullptr;
                        }
                        else
                        {
                            //玩家2复活次数减1
                            Game::Revive_User2--;
                            Show_Revive();
                            //让user2回到起始位置
                            Game::user2->pos = { 38,26 };
                            for (int i = 0; i < 3; i++)
                            {
                                Map::Colors(紫色);
                                Map::WriteChar(37 + i, 25, Map::tank_user2[i]);
                            }
                        }
                    }
                }
            }            
        }
    }

}
//检测输赢
void Bullet::vin(bool Home)
{
    if (Game::AI1 == nullptr && Game::AI2 == nullptr && Game::AI3 == nullptr)
    {
        Map::Clear_Map();
        //说明全部通关
        if (Map::Level == 8)
        {
            Map::WriteChar(20, 15, "恭喜,全部通关n");
            Sleep(3000);
        }
        else
        {
            Map::WriteChar(20, 15, "玩家胜利,即将进入下一关卡n");
            Map::dynamic[41][41] = { 0 };
            Game::Level_Loc = true;
            if (Game::play == 1)
            {
                Clear_Tank({ Game::user1->pos.X, Game::user1->pos.Y });
            }
            else
            {
                Clear_Tank({ Game::user1->pos.X, Game::user1->pos.Y });
                Clear_Tank({ Game::user2->pos.X, Game::user2->pos.Y });
            }
            Sleep(1500);
        }

    }
    if (Game::play == 2)
    {            //如果都等于空,说明玩家死亡,游戏结束        
        if (Game::user1 == nullptr && Game::user2 == nullptr|| Home==false)
        {
            //所有数据清空,并返回主菜单
            //需要重新进入欢迎界面标记
            Game::Over = true;
            //如果有AI没死,我们就让他死掉重新初始化
            if (Game::AI1 != nullptr)
            {
                delete Game::AI1;
                Game::AI1 = nullptr;
            }
            if (Game::AI2 != nullptr)
            {
                delete Game::AI2;
                Game::AI2 = nullptr;
            }
            if (Game::AI3 != nullptr)
            {
                delete Game::AI3;
                Game::AI3 = nullptr;
            }
            //把动态地图清空
            for (int x = 0; x < 41; x++)
            {
                for (int i = 0; i < 41; i++)
                {
                    Map::dynamic[x][i] = 0;
                }
            }
        }
    }
    else if (Game::play == 1)
    {
        if (Game::user1 == nullptr || Home == false)
        {
            //所有数据清空,并返回主菜单
            Game::Over = true;
            if (Game::AI1 != nullptr)
            {
                delete Game::AI1;
                Game::AI1 = nullptr;
            }
            if (Game::AI2 != nullptr)
            {
                delete Game::AI2;
                Game::AI2 = nullptr;
            }
            if (Game::AI3 != nullptr)
            {
                delete Game::AI3;
                Game::AI3 = nullptr;
            }
            for (int x = 0; x < 41; x++)
            {
                for (int i = 0; i < 41; i++)
                {
                    Map::dynamic[x][i] = 0;
                }
            }
        }
    }
}

地图类(略长)

#include "Map.h"
#include "Game.h"
int Map::static_Map[HIGHT][HIGHT] = {};
int Map::dynamic[HIGHT][WIDTH] = {};
char Map::Type;
//关卡地图初始化
int Map::Level = 1;
//用于副屏幕模型显示
const char* Map::tank_user1[3] =
{
     { "█┃ █"},
     { "█●█"},
     { "█┻ █"}
};
const char* Map::tank_user2[3]{
    {"◢┃ ◣" },
    {"┣ ●┫"},
    {"◥━ ◤" }
};
void Map::Init_Map()
{
    int i, j;
    int Map[9][41][41] =
    {
         {//钢墙白色■值为6,,土墙黄色▓值为2   ,土墙红▓值为1,海蓝色~值为5 ,普通白(老家)值为9
    {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4},
    {4,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,4},
    {4,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,4},
    {4,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,4},
    {4,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,4},
    {4,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,4},
    {4,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,4},
    {4,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,4},
    {4,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,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
    {4,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,4},
    {4,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,4},
    {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
    {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
    {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
    {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
    {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
    {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}
    },
    {//钢墙白色■值为6,,土墙黄色▓值为2   ,土墙红▓值为1,海蓝色~值为5 ,普通白(老家)值为9
    {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4},
    {4,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,4},
    {4,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,4},
    {4,0,0,0,0,0,0,0,0,0,0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