• 大小: 0.01M
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2024-04-13
  • 语言: C/C++
  • 标签: 吃豆人  

资源简介

很好玩

资源截图

代码片段和文件信息

#include 
#include 
#include 
#include 
#include        //停顿:Sleep(); 
#include          //清屏:system(“cls“);
#include 
using namespace std;
const int n=809;
struct Point {int xy;};
int dali;
int fx[4]={-1271-27};
int fxfx[4][2]={{0-1}{10}{01}{-10}};
int dis[1000][1000]; //0:墙 1:有分的路 2:没分的路 3:怪物的家 
int changdi[30][27]={
    {00000000000000000000000000}
    {011111111111101111111111110}
    {010000100000101000001000010}
    {010000100000101000001000010}
    {010000100000101000001000010}
    {011111111111111111111111110}
    {010000100100000001001000010}
    {011111100111101111001111110}
    {000000100000202000001000000}
    {000000100000202000001000000}
    {000000100222222222001000000}
    {000000100200030002001000000}
    {000000100203333302001000000}
    {222222122203333302221222222}
    {000000100203333302001000000}
    {000000100200000002001000000}
    {000000100222222222001000000}
    {000000100200000002001000000}
    {000000100200000002001000000}
    {011111111111101111111111110}
    {010000100000101000001000010}
    {010000100000101000001000010}
    {011100111111111111111001110}
    {000100100100000001001001000}
    {000100100100000001001001000}
    {011111100111101111001111110}
    {010000000000101000000000010}
    {010000000000101000000000010}
    {011111111111111111111111110}
    {000000000000000000000000000}
};
int xx1x2x3x4yy1y2y3y4;
int nownow1now2now3now4;
int g1g2g3g4;
int fangxnextfxlast1last2last3last4;
int fenshuguoziguaitimer;
int T1T2t1t2stopped; //T:计时 t1:玩家速度 t2:怪物速度 
int f=0; //f:{0:继续 1:被吃 2:赢了 3:输了}
int beichi;
void color(int a)//颜色函数
{
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE)a);
}
void gotoxy(int xint y)//位置函数(行为x 列为y)
{
COORD pos;
pos.X=2*y;
pos.Y=x;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE)pos);
}

void begin(){
    system(“cls“);
    color(11); printf(“       ★“); color(10); printf(“吃豆人“); color(11); printf(“★\n\n“); color(7);
    printf(“     请将窗口开至“); color(11); printf(“全屏\n“); color(7);
    printf(“  正在初始化,请耐心等待“); 
    fo

评论

共有 条评论