| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2966 人关注过本帖
标题:[原创]一个考验你IQ的密码破译游戏,挑战你的逻辑能力
取消只看楼主 加入收藏
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
结帖率:0
收藏
 问题点数:0 回复次数:6 
[原创]一个考验你IQ的密码破译游戏,挑战你的逻辑能力

nZOSHKWS.rar (37.13 KB) [原创]一个考验你IQ的密码破译游戏,挑战你的逻辑能力

前几天看了丹·布朗的《达芬奇密码》,深有感触.与是又看了看关于密码学的相关材料,所以便有了做一个关于破译密码游戏的想法. 相信一定会有很多对破译密码和逻辑推理感兴趣的人,这个游戏完全融入了许多密码学的理论,而且在密文选择上做到了通俗易懂,完全用的是原始手写加密的基础方法.只要有一些密码学的相关知识的人都可以来破解,不过在破译过程中你会发现有一些难度.为了保证游戏的可玩性我并没有涉及到更高深的密文方法,如N位阿尔法分组,恺撒矩阵等.如果在做游戏之前你还没有进行过密文解密训练的话,建议先到网上学学基础密码学的相关知识.看<达芬奇密码>的话,也会对你大有帮助.本游戏基本上借鉴了达芬奇密码中的相关加密方法. 接下来介绍以下游戏中的内容.本游戏一共分8关,第一关是入门关,只要对密码学有一些了解的话,第一关绝对是小菜儿.不过以后的东西多少要考验一下你的逻辑推理能力.其中有一关结束后会提供一个网址,这个网址的作用会在下一关用到,就是说根据密文和这个网址相结合你才会找到相应的密码. 关于游戏中的特殊键:F1提供帮助,它只提示密码是数字还是字母.无论是数字还是字母都不包括标点或其他特殊字符,只是单纯的字母和数字,这样多少会降低一些难度. 至于游戏的提示和另外一个特殊键,我会发表在灌水区,如果遇到麻烦的话可以到那里看看提示,当然要收一些银子的了,呵呵,不要怪我,都是跟knoker学的. 如果全部通关的话,在游戏的结尾会出现一个东西,那是我给大家的惊喜,至于那是什么,到时候你就会知道了.如果能够通关希望你能够往我的邮箱里发个邮件,我很乐意跟聪明的人打交道.在邮件中需要你对各关的解释,这样可以使我知道你确实全部通关.

如果你对自己的推理能力很有信心的话,这个游戏确实是一个考验你的东西,何不来试试呢?

密码答案地址: http://bbs.bc-cn.net/bbs/dispbbs.asp?boardID=35&ID=14270&page=1

[此贴子已经被作者于2005-4-10 13:11:21编辑过]



ehvE8oj7.rar (36.83 KB) [原创]一个考验你IQ的密码破译游戏,挑战你的逻辑能力

搜索更多相关主题的帖子: 密码 恺撒 阿尔法 游戏 逻辑 
2005-03-28 20:49
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 
当然 阁下怎么会得知~

qq:69558139
2005-03-29 17:58
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 
我记得我有说过考虑到了可玩性就是考虑有些人并没有充足的解码能力 如果你觉得很简单我倒要看看你能过几关
   如果你想要再难一些的话我也有 不过到时候恐怕楼上的连一关也过不去了吧

qq:69558139
2005-04-03 17:20
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 
原代码如下:
#include&lt;bios.h&gt;
#include&lt;dos.h&gt;
#include&lt;stdlib.h&gt;
#include&lt;stdio.h&gt;
#include&lt;graphics.h&gt;
#define LEFT  0x4b00
#define RIGHT 0x4d00
#define BS    8
#define F1    0x3b00
#define TAB   0xf09
#define ESC   0x011b
#define DOWN  0x5000
#define UP    0x4800
#define ENTER 0x1c0d
#define C 1046.5
#define D 1174.7
#define E 1318.5
#define HD 587.3
#define HE 659.3
#define HF 698.5
#define HG 784
#define HA 880
#define HB 987.8
#define HC 523.3
#define TIMER 0x1c
int queue[4],rear;
int TimerCounter,tab,codeshow,sign,j,count[8]={1,2,4,8,16,32,64,128};
unsigned char ch;
union KeyIn
{
  int x;
  char h;
}accept;
void CodeCut()
{
  setfillstyle(0,0);
  bar(0,280,640,380);
  codeshow=0;
  _SoundKey();
}
void Enqueue(int value)
{
  rear=(rear+1)%4;
  queue[rear]=value;
}
void Compare()
{
  int value=(rear+1)%4;
  if(queue[value]==UP&amp;&amp;queue[(value+1)%4]==UP&amp;&amp;queue[(value+2)%4]==DOWN&amp;&amp;queue[(value+3)%4]==DOWN)
   { tab=1; SoundErr(); }
}
void interrupt (*OldTimer)();
void interrupt NewTimer()
{ TimerCounter++; OldTimer(); }
void SetTimer(void interrupt (*faddr)())
{
  OldTimer=getvect(TIMER);
  disable();
  setvect(TIMER,faddr);
  enable();
}
void KillTimer()
{
  disable();
  setvect(TIMER,OldTimer);
  enable();
}
void CodeGraph()
{
  int i,t,k,n;
  unsigned char a[36],b[2],s;
  b[1]='\0';
  KillTimer();
  setcolor(RED);
  for(k=0,i=48;i&lt;58;i++,k++)a[k]=i;
  for(i=65;i&lt;91;i++,k++)a[k]=i;
   t=284;  k=0;
  for(i=170;i&lt;410;i+=24)
      {
        b[0]=a[k++];
        outtextxy(i,t,b);
      }
  n=k;
  for(;i&lt;483;i+=32)
   {
     s=itoa(n++,b,10);
     outtextxy(i,t,b);
   }
  t+=15; b[1]='\0';
  for(i=170;i&lt;386;i+=24)
      {
        b[0]=a[k++];
        outtextxy(i,t,b);
      }
  for(;i&lt;495;i+=30)
   {
     b[0]=a[k++];
     outtextxy(i,t,b);
   }
  t+=15;
  for(i=476;i&gt;386;i-=30)
   {
     b[0]=a[k++];
     outtextxy(i,t,b);
   }
  for(;i&gt;151;i-=24)
   {
     b[0]=a[k++];
     outtextxy(i,t,b);
   }
  t+=15;
  for(i=476;i&gt;386;i-=30)
   {
     s=itoa(n++,b,10);
     outtextxy(i,t,b);
   }
  for(;i&gt;151;i-=24)
   {
     s=itoa(n++,b,10);
     outtextxy(i,t,b);
   }
  codeshow=1;
  SoundKey();
  SetTimer(NewTimer);
}
void Help(int value)
{
 unsigned char mat[9][24][3]={
{0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,
0x00,0x02,0x01,0xE0,0x02,0x1E,0x60,0x02,
0x10,0x60,0x02,0x17,0x40,0x02,0x08,0x40,
0x07,0x88,0x40,0x3E,0x0F,0x80,0x02,0x08,
0x00,0x02,0x81,0xF8,0x03,0x3E,0x00,0x06,           /*提0*/
0x02,0x00,0x0E,0x22,0x00,0x3A,0x33,0xC0,
0xE2,0x32,0x00,0x42,0x6E,0x00,0x02,0x43,
0x00,0x02,0x81,0xC0,0x0F,0x00,0x7C,0x06,
0x00,0x3E,0x04,0x00,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x1F,0x80,0x01,
0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x03,0xF8,0x01,0xFF,         /*示1*/
0xFC,0x3F,0x18,0x00,0x00,0x18,0x00,0x00,
0x08,0x00,0x02,0x08,0xC0,0x06,0x08,0x60,
0x06,0x08,0x30,0x0C,0x08,0x10,0x04,0x18,
0x00,0x00,0x78,0x00,0x00,0x18,0x00,0x00,
0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x30,0x00,0x00,0x18,
0x00,0x00,0x08,0x00,0x00,0x00,0x70,0x04,
0xFF,0x98,0x0F,0x00,0x30,0x08,0x02,0x20,
0x18,0x32,0x00,0x00,0x06,0x60,0x04,0x8C,            /*密2*/
0x38,0x0C,0x98,0x18,0x08,0x70,0x80,0x08,
0x7D,0xE0,0x00,0x8F,0x80,0x03,0x10,0x00,
0x0C,0x18,0x00,0x10,0x08,0xC0,0x01,0x08,
0x40,0x01,0x08,0x40,0x01,0x0B,0xC0,0x03,
0xF4,0x40,0x03,0x00,0x40,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x01,0xE0,0x00,0x0E,0x60,0x03,
0xC0,0x60,0x1E,0x08,0x40,0x03,0x04,0x40,
0x03,0x04,0x40,0x02,0x04,0x40,0x06,0x04,           /*码3*/
0x40,0x0D,0xCC,0x98,0x0E,0xCF,0xFE,0x0C,
0xCC,0x04,0x14,0x80,0x04,0x37,0xC0,0x4C,
0x24,0x0F,0xEC,0x44,0x78,0x0C,0x00,0x00,
0x0C,0x00,0x00,0x08,0x00,0x00,0x38,0x00,
0x00,0x18,0x00,0x00,0x10,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,
0x00,0x01,0xF1,0x80,0x00,0x81,0x00,0x00,
0x99,0x00,0x00,0xE3,0x00,0x00,0x42,0x00,
0x00,0x4E,0x00,0x00,0x72,0x00,0x00,0x01,
0xE0,0x00,0x3F,0x00,0x07,0xD8,0x00,0x08,      /*是4*/
0x18,0x00,0x01,0x19,0x80,0x03,0x1E,0x00,
0x03,0x10,0x00,0x06,0xD0,0x00,0x0C,0x30,
0x00,0x08,0x0C,0x00,0x30,0x07,0xC0,0x40,
0x01,0xFF,0x00,0x00,0x78,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,
0x00,0x01,0x81,0x00,0x01,0x10,0x80,0x01,
0x11,0x80,0x05,0x21,0x80,0x07,0x01,0x00,
0x01,0xF3,0x00,0x1F,0x02,0xFC,0x03,0x67,
0x80,0x05,0x28,0x80,0x09,0x08,0xC0,0x11,
0x08,0x80,0x21,0x24,0x80,0x03,0xE3,0x80,       /*数5*/
0x7E,0x61,0x00,0x02,0x43,0x80,0x03,0x82,
0x40,0x01,0xC4,0x70,0x02,0x78,0x3C,0x0C,
0x00,0x1E,0x30,0x00,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x60,0x00,0x00,0x38,
0x00,0x00,0x18,0x00,0x00,0x01,0xE0,0x04,
0xFE,0x70,0x0F,0x00,0x60,0x0C,0x00,0x80,
0x18,0x3E,0x00,0x01,0xC6,0x00,0x00,0x0C,       /*字6*/
0x00,0x00,0x28,0x00,0x00,0x10,0x60,0x00,
0x3F,0xF8,0x3F,0xC8,0x00,0x18,0x08,0x00,
0x00,0x0C,0x00,0x00,0x0C,0x00,0x00,0x0C,
0x00,0x00,0x0C,0x00,0x00,0x48,0x00,0x00,
0x38,0x00,0x00,0x18,0x00,0x00,0x10,0x00},
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x38,0x00,0x00,0x70,0x00,0x03,
0x80,0x00,0x0C,0xC0,0x00,0x00,0xC0,0x00,
0x00,0x80,0x00,0x00,0xF8,0x18,0x0F,0x8F,
0xFE,0x31,0x84,0x0C,0x03,0x86,0x08,0x02,          /*和7*/
0xE2,0x08,0x06,0xB2,0x18,0x0C,0x82,0xF8,
0x18,0x83,0x00,0x30,0x82,0x00,0x40,0x80,
0x00,0x00,0x80,0x00,0x00,0x80,0x00,0x00,
0x80,0x00,0x00,0x80,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
0x00,0x01,0xBF,0x80,0x00,0xC1,0x80,0x00,
0x81,0x80,0x00,0x91,0x80,0x01,0x99,0x80,
0x01,0x01,0x80,0x01,0x07,0xFE,0x07,0xF9,           /*母8*/
0x80,0x79,0x01,0x80,0x03,0x11,0x80,0x02,
0x19,0x80,0x02,0x01,0x00,0x06,0x01,0x00,
0x0F,0xFF,0xF0,0x08,0x01,0x30,0x00,0x03,
0x00,0x00,0x1B,0x00,0x00,0x06,0x00,0x00,
0x06,0x00,0x00,0x04,0x00,0x00,0x00,0x00}
};
  int x,y,a,i,k,n;
  KillTimer();
  if(codeshow)CodeCut();
  setfillstyle(1,BLUE);
  bar(150,290,500,370);
  setcolor(RED);
  rectangle(150,290,500,370);
  /* 字模 -1 数字 0 字母 1 数字+字母 */
  x=160; y=300;
  for(a=0;a&lt;2;a++)
  {
  for(i=0;i&lt;24;i++)
   for(k=0;k&lt;3;k++)
    for(n=0;n&lt;8;n++)
     {
       if(mat[a][i][k]&amp;(0x80&gt;&gt;n))putpixel(x+k*8+n,y+i,RED);
     }
  x+=30;
  }
  y+=30;  x+=10;
  for(;a&lt;5;a++)
  {
  for(i=0;i&lt;24;i++)
   for(k=0;k&lt;3;k++)
    for(n=0;n&lt;8;n++)
     {
       if(mat[a][i][k]&amp;(0x80&gt;&gt;n))putpixel(x+k*8+n,y+i,RED);
     }
  x+=30;
  }
  switch(value)
   {
     case -1:for(a=5;a&lt;7;a++)
              {
               for(i=0;i&lt;24;i++)
                for(k=0;k&lt;3;k++)
                 for(n=0;n&lt;8;n++)
                  {
                    if(mat[a][i][k]&amp;(0x80&gt;&gt;n))putpixel(x+k*8+n,y+i,RED);
                  }
               x+=30;
              }
              break;
     case 0:for(a=6;a&lt;9;a+=2)
              {
               for(i=0;i&lt;24;i++)
                for(k=0;k&lt;3;k++)
                 for(n=0;n&lt;8;n++)
                  {
                    if(mat[a][i][k]&amp;(0x80&gt;&gt;n))putpixel(x+k*8+n,y+i,RED);
                  }
               x+=30;
              }
              break;
     case 1:for(a=5;a&lt;8;a++)
              {
               for(i=0;i&lt;24;i++)
                for(k=0;k&lt;3;k++)
                 for(n=0;n&lt;8;n++)
                  {
                    if(mat[a][i][k]&amp;(0x80&gt;&gt;n))putpixel(x+k*8+n,y+i,RED);
                  }
               x+=30;
              }
             for(a=6;a&lt;9;a+=2)
              {
               for(i=0;i&lt;24;i++)
                for(k=0;k&lt;3;k++)
                 for(n=0;n&lt;8;n++)
                  {
                    if(mat[a][i][k]&amp;(0x80&gt;&gt;n))putpixel(x+k*8+n,y+i,RED);
                  }
               x+=30;
              }
              break;
   }
  SoundErr();
  delay(650000);
  delay(650000);
  delay(650000);
  delay(650000);
  setfillstyle(0,0);
  bar(150,290,500,370);
  SetTimer(NewTimer);
}
void SoundTime()
{     /*1568*/    /*5000*/
  sound(784);delay(1000);nosound();
}
void _SoundTime()
{
  sound(1568);delay(1000);nosound();
}
SoundKey()
{
  int i;    /*1500*/
  for(i=400;i&lt;1200;i+=120)
   { sound(i);delay(1000);nosound(); }
}
_SoundKey()
{
  int i;
  for(i=1500;i&gt;400;i-=120)
   {              /*10000*/
     sound(i);delay(1000);nosound();
   }
}
SoundErr()
{
  sound(1200);delay(75000);nosound();
}
void _SoundErr()
{
  sound(1200);delay(30000);nosound();
  sound(1200);delay(75000);nosound();
  sound(1200);delay(75000);nosound();
}
void Sound_Err()
{
  int i;
  for(i=0;i&lt;3;i++)
   { sound(1200);delay(75000);nosound(); }
}
void TimeGraph()
{
  int x=111,i;
  setfillstyle(1,BLUE);
  for(i=0;i&lt;30;i++)
   {
     bar(x,400,x+5,450);
     x+=7;
   }
  setfillstyle(1,YELLOW);
  for(i=0;i&lt;20;i++)
   {
     bar(x,400,x+5,450);
     x+=7;
   }
  setfillstyle(1,RED);
  for(i=0;i&lt;10;i++)
   {
     bar(x,400,x+5,450);
     x+=7;
   }
}
void _TimeGraph()
{
  setfillstyle(1,BLUE);
  bar(170,400,320,450);
  setfillstyle(1,YELLOW);
  bar(320,400,420,450);
  setfillstyle(1,RED);
  bar(420,400,470,450);
}
void CutTime(int x)
{
  setfillstyle(0,0);
  bar(x,399,x+7,451);
}
void _CutTime(int x)
{
  setcolor(BLACK);
  line(x,399,x,451);
}
void PutStage(char *s)
{
  setcolor(WHITE);
  settextstyle(0,0,3);
  outtextxy(220,50,"STAGE");
  outtextxy(380,50,s);
}
void Eraser(int y)
{
  setfillstyle(0,0);
  bar(y,230,y+10,240);
}
void DelCode()
{
  setfillstyle(0,0);
  bar(219,229,359,239);
  _SoundKey();
}
void translate(char *s)
{
  int i;
  for(i=0;s[i];i++)s[i]-=4;
}  

qq:69558139
2005-04-12 18:56
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 
void NextStage(char *other)
{               /*C,D,E,C,G=1568*/
  unsigned char mat[8][24][3]={
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC3,
0x00,0x00,0xC3,0x00,0x00,0xC3,0x00,0x1F,
0xFF,0xF8,0x00,0xC3,0x00,0x00,0xC3,0x00,
0x00,0xC3,0x00,0x3F,0xFF,0xFC,0x3F,0xFF,             /*恭0*/
0xFC,0x00,0xC3,0x00,0x01,0xB1,0x80,0x07,
0x30,0xE0,0x0E,0x30,0x7C,0x78,0x30,0x1C,
0x33,0x36,0x64,0x03,0x33,0x60,0x06,0x33,
0x30,0x0C,0x31,0xB0,0x1C,0x31,0x98,0x00,
0xF0,0x00,0x00,0x70,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,
0x00,0x3F,0xFF,0xFC,0x3F,0xFF,0xFC,0x00,
0x18,0x00,0x0F,0xFF,0xF0,0x0F,0xFF,0xF0,
0x00,0x00,0x00,0x07,0xFF,0xE0,0x06,0x00,
0x20,0x06,0x00,0x20,0x07,0xFF,0xE0,0x00,        /*喜1*/
0x81,0x00,0x00,0xC1,0x80,0x7F,0xFF,0xFE,
0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,
0xE0,0x06,0x00,0x60,0x06,0x00,0x60,0x07,
0xFF,0xE0,0x06,0x00,0x60,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x0C,
0x00,0x06,0x0C,0x00,0x06,0x18,0x00,0x06,
0x18,0x00,0x0C,0x1F,0xFC,0x0C,0x30,0x0C,
0x1C,0x70,0x18,0x1C,0x63,0x18,0x34,0x43,          /*你2*/
0x18,0x64,0x03,0x00,0x24,0x03,0x00,0x04,
0x23,0x30,0x04,0x33,0x30,0x04,0x33,0x18,
0x04,0x63,0x18,0x04,0x63,0x0C,0x0C,0xC3,
0x0C,0x0C,0xC3,0x04,0x0C,0x03,0x00,0x0C,
0x0F,0x00,0x0C,0x0F,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,         /*,3*/
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x1E,0x00,0x00,0x1E,0x00,0x00,0x0C,0x00,
0x00,0x04,0x00,0x00,0x08,0x00,0x00,0x10,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x01,
0x80,0x0E,0x03,0x00,0x0F,0xF3,0xFE,0x19,
0x06,0x20,0x19,0x8E,0x30,0x31,0x90,0x30,
0x00,0xF8,0x10,0x00,0x7C,0x00,0x00,0xEE,
0x00,0x01,0xC3,0x80,0x07,0x81,0xE0,0x1E,
0xFF,0x7E,0x3C,0x00,0x1C,0x00,0x00,0x00,
0x03,0xFF,0xE0,0x03,0x00,0x60,0x03,0x00,           /*答4*/
0x60,0x03,0x00,0x60,0x03,0xFF,0xE0,0x03,
0xFF,0xE0,0x03,0x00,0x60,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x30,0x00,0x00,0x30,0x00,0x00,0x30,0x3F,
0xC0,0x30,0x00,0x40,0x30,0x00,0xDF,0xFE,
0x00,0xDF,0xFE,0x08,0xC0,0x30,0x1C,0xC0,
0x30,0x0C,0x84,0x30,0x07,0x8E,0x30,0x03,       /*对5*/
0x86,0x30,0x03,0x87,0x30,0x03,0xC3,0x30,
0x06,0xC0,0x30,0x0E,0x60,0x30,0x0C,0x60,
0x30,0x38,0x00,0x30,0x70,0x00,0x30,0x20,
0x01,0xF0,0x00,0x00,0xE0,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x1F,0xFF,0xF8,0x1F,0xFF,0xF8,0x00,
0x00,0x78,0x00,0x01,0xE0,0x00,0x03,0x80,
0x00,0x0F,0x00,0x00,0x1C,0x00,0x00,0x18,          /*了6*/
0x00,0x00,0x18,0x00,0x00,0x18,0x00,0x00,
0x18,0x00,0x00,0x18,0x00,0x00,0x18,0x00,
0x00,0x18,0x00,0x00,0x18,0x00,0x00,0x18,
0x00,0x00,0x18,0x00,0x00,0x38,0x00,0x00,
0xF8,0x00,0x00,0x60,0x00,0x00,0x00,0x00},
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x03,
0x80,0x00,0x03,0x80,0x00,0x03,0x00,0x00,
0x03,0x00,0x00,0x03,0x00,0x00,0x03,0x00,
0x00,0x01,0x00,0x00,0x01,0x00,0x00,0x01,           /*!7*/
0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x03,0x80,0x00,0x03,0x80,
0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00}
};
  float music[5]={HC,HD,HE,HC,HG};
  int x,a,i,k,n;
  /*字模:恭喜你,答对了*/
  if(codeshow)CodeCut();
  setfillstyle(1,BLUE);
  bar(150,300,500,360);
  setcolor(RED);
  rectangle(150,300,500,360);
  x=200;/*y=320*/
  for(a=0;a&lt;8;a++)
   {
    for(i=0;i&lt;24;i++)
     for(k=0;k&lt;3;k++)
      for(n=0;n&lt;8;n++)
       {
         if(mat[a][i][k]&amp;(0x80&gt;&gt;n))putpixel(x+k*8+n,320+i,RED);
       }
    x+=30;
   }
  for(i=0;i&lt;5;i++)        /*5000*/
   { sound(music[i]);delay(10000);nosound(); }
  ch=count[++j];
  delay(65000);
  delay(65000);
  delay(65000);
  delay(65000);
  setfillstyle(0,0);
  bar(150,300,500,360);
  if(other!=NULL){ outtextxy(200,300,"Please remember this Website:"); outtextxy(70,350,other); getch(); }
}
int Save()
{
  FILE *fp;
  if((fp=fopen("c:\\CRACK.txt","w"))==NULL)return 0;
  fputc(ch,fp);
  fclose(fp);
  return 1;
}
void Load()
{
  FILE *fp;
  int n,i;
  if((fp=fopen("c:\\CRACK.txt","r"))==NULL){ Save(); return; }
  else n=fgetc(fp);
  for(i=0;i&lt;8;i++)if(n==count[i])break;
  if(i&lt;8){ ch=n; j=i; }
  fclose(fp);
}
void Init()
{
  int gd=DETECT,gm=0;
  registerbgidriver(EGAVGA_driver);
  initgraph(&amp;gd,&amp;gm,"");
}
void InitType()
{
  int i;
  tab=0; codeshow=0; sign=1; j=0; ch=count[j];
  TimerCounter=0; rear=-1;
  for(i=0;i&lt;4;i++)queue[i]=0;
}
void Congratulation()
{
  float str[47][2]={{0,0},{HA,60000},{HA,60000},{HA,60000},
                    {HB,60000},{C,30000},{D,30000},{D,30000},{D,30000},
                    {D,30000},{D,30000},{C,15000},{C,15000},{C,60000},
                    {D,15000},{E,15000},{D,60000},{E,30000},{HA,30000},
                    {HG,30000},{HE,30000},{HD,30000},{HE,30000},{HE,15000},
                    {HE,30000},{HE,60000},{HE,60000},{HG,30000},{HF,30000},
                    {HG,60000},{C,30000},{HA,30000},{HA,15000},{HA,30000},
                    {HA,60000},{HA,60000},{HE,30000},{HG,30000},{HA,15000},
                    {HB,15000},{C,30000},{C,60000},{C,60000},{HB,30000},
                    {C,30000},{HE,15000},{HE,30000}};
  int m=46;
  sign=0;
  cleardevice();
  setbkcolor(BLACK);
  setcolor(WHITE);
  settextstyle(0,0,2);
  outtextxy(160,150,"Congratulations!");
  settextstyle(0,0,1);
  sleep(1);
  outtextxy(180,200,"Thank you for your playing");
  sleep(1);
  outtextxy(240,250,"Good luck!");
  sleep(1);
  outtextxy(100,300,"http://photo.);
  while(!kbhit())
   {
     sound(str[m][0]);delay(str[m--][1]);nosound();
     if(!m)m=46;
   }
}

qq:69558139
2005-04-12 18:57
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 
void Select(int i) { switch(i) { case 0:Stage("1",0,"{ipgsqi","22-4-11-2-14-12-4",NULL,0);break; /* 四个参数 stageID(关数),helpID(帮助代号),code(密码),condition(条件或暗示)*/ case 1:Stage("2",-1,"57=85;78954","RJFI:QRRTSMKGNDCG",NULL,0);break; /* -1 数字 0 字母 1 数字+字母 */ case 2:Stage("3",0,"he$zmrgm","WZ ERMXR",NULL,0);break; case 3:Stage("4",0,"]yrQmrk","3111556","http://shada.w11.51web.cn/bbs/dispbbs.asp?boardID=18&ID=5646",0);break; case 4:Stage("5",0,"HMJSLXYTSJ","112,110,100,99 100 116,120 22 115,111,118",NULL,1);break; case 5:Stage("6",0,"glirkwxsri","DIFOHTUPOF",NULL,0);break; case 6:Stage("7",-1,"87778;4<","69-68-68-68-69-72-65-73",NULL,0);break; case 7:Stage("8",0,"gsrkvexypexmsrw","ann,a tutor's logic",NULL,0);break; case 8:Congratulation();break; /*这里用樱花大战的音乐 开头是麻利医生的音乐 */ } } void Escape() { int key,n=0; KillTimer(); settextstyle(0,0,3); if(codeshow)CodeCut(); setfillstyle(1,BLUE); bar(150,280,500,380); setcolor(RED); rectangle(150,280,500,380); setcolor(YELLOW); outtextxy(170,300,"GO> Save Game"); outtextxy(170,350," Exit Game"); while((key=bioskey(0))!=ENTER) { switch(key) { case UP:if(n) { n=0; bar(170,350,240,370); outtextxy(170,300,"GO>"); SoundKey(); } else SoundErr(); break; case DOWN:if(!n) { n=1; bar(170,300,240,320); outtextxy(170,350,"GO>"); SoundKey(); } else SoundErr(); break; case ESC:CodeCut(); settextstyle(0,0,1); setfillstyle(0,0);goto jump;break; default:SoundErr();break; } } settextstyle(0,0,1); setfillstyle(0,0); if(n)sign=0; else { n=Save(); bar(150,280,500,380); setcolor(RED); rectangle(240,280,320,330); setcolor(YELLOW); if(n)outtextxy(250,300,"SAVE OK"); else outtextxy(250,300,"SAVE FAIL"); delay(60000); bar(150,280,500,380); } jump: SetTimer(NewTimer); } void Display() { float str[47][2]={{0,0},{HA,60000},{HA,60000},{HA,60000}, {HB,60000},{C,30000},{D,30000},{D,30000},{D,30000}, {D,30000},{D,30000},{C,15000},{C,15000},{C,60000}, {D,15000},{E,15000},{D,60000},{E,30000},{HA,30000}, {HG,30000},{HE,30000},{HD,30000},{HE,30000},{HE,15000}, {HE,30000},{HE,60000},{HE,60000},{HG,30000},{HF,30000}, {HG,60000},{C,30000},{HA,30000},{HA,15000},{HA,30000}, {HA,60000},{HA,60000},{HE,30000},{HG,30000},{HA,15000}, {HB,15000},{C,30000},{C,60000},{C,60000},{HB,30000}, {C,30000},{HE,15000},{HE,30000}}; int i,m=46; cleardevice(); setcolor(RED); settextstyle(0,0,8); outtextxy(80,60,"CRACK"); outtextxy(350,180,"GAME"); setcolor(WHITE); settextstyle(0,0,1); outtextxy(70,340,"Tel:13941734510"); outtextxy(220,340,"E-mail:chengstone@21cn.com"); outtextxy(460,340,"QQ:43334708"); randomize(); while(!bioskey(1)) { setcolor(rand()%15+1); outtextxy(280,280,"Enter"); sound(str[m][0]);delay(str[m--][1]);nosound(); if(!m)m=46; setcolor(0); for(i=0;i<10;i++)line(300,240+i,340,240+i); sound(str[m][0]);delay(str[m--][1]);nosound(); if(!m)m=46; } getch(); } void Start() { int key=-1,n; cleardevice(); setcolor(6); settextstyle(0,0,2); outtextxy(170,130,"GO> New Game"); outtextxy(170,175," Load Game"); outtextxy(170,225," Exit Game"); setfillstyle(0,0); while((n=bioskey(0))!=ENTER) { switch(n) { case UP:if(key>-1) { if(key) { bar(170,225,170+50,250+20); outtextxy(170,175,"GO>"); } else { bar(170,175,170+50,175+20); outtextxy(170,130,"GO>"); } key--; SoundKey(); } else SoundErr(); break; case DOWN:if(key<1) { if(key) { bar(170,130,170+50,130+20); outtextxy(170,175,"GO>"); } else { bar(170,175,170+50,175+20); outtextxy(170,225,"GO>"); } key++; SoundKey(); } else SoundErr(); break; case ESC:if(key<1) { if(key)bar(170,130,170+50,130+20); else bar(170,175,170+50,175+20); outtextxy(170,225,"GO>"); key=1; SoundKey(); } else SoundErr(); break; default:SoundErr();break; } } settextstyle(0,0,1); if(key==1)sign=-1; else if(key==0)Load(); } Stage(char *stageID,int helpID,char *code,char *condition,char *other,int end) { int time=60,x=110,y=220,i=0,ON=0; char buff[16]={0},word[2]; word[1]='\0'; TimerCounter=0; cleardevice(); PutStage(stageID); setcolor(YELLOW); settextstyle(0,0,1); if(!end)outtextxy(230,150,condition); else outtextxy(150,150,condition); setcolor(RED); outtextxy(250,210,"Password:"); rectangle(195,200,390,250); translate(code); TimeGraph(); SetTimer(NewTimer); while(time&&!ON&&sign) { if(TimerCounter>18) { time-=1; TimerCounter=0; CutTime(x); x+=7; _SoundTime(); } if(kbhit()) { accept.x=bioskey(0); if(!tab)Enqueue(accept.x); if(accept.x==F1||accept.x==UP||accept.x==DOWN||accept.x==TAB||accept.x==ESC||accept.x==ENTER||accept.x==LEFT||accept.x==RIGHT) { switch(accept.x) { case F1:Help(helpID);break; case DOWN:if(!tab)Compare();break; case TAB:if(tab&&!codeshow)CodeGraph(); else if(codeshow)CodeCut(); break; case ESC:Escape();break; case ENTER:buff[i]='\0'; if(strcmp(code,buff)==0)ON=1; else { i=0; buff[i]='\0'; y=220; DelCode(); } break; } } else { if(accept.h==BS) { if(i>0) /*if(y>130)*/ { y-=10; Eraser(y); buff[--i]='\0'; } } else if(i<15) { setcolor(RED); word[0]=accept.h; buff[i++]=accept.h; outtextxy(y,230,word); y+=10; } } } if(time<11) if(TimerCounter%18==0)SoundTime(); } KillTimer(); if(ON)NextStage(other); else sign=0; } int randto(int m,int n) { return rand()%n+m; } void GameOver() { register i,j; int osize,size,x,y; void *buffer,*buff; setcolor(15); randomize(); for(x=1;x<6-2;x++) { line(0,240,x,240); delay(2000); if(x==5-2)for(y=1;y<6-2;y++) { line(0,239,y,239); line(0,241,y,241); line(0,240,x+y,240); delay(2000); if(y==5-2)for(i=1;i<=640;i++) { line(0,238,i,238); line(0,242,i,242); line(0,239,y+i,239); line(0,241,y+i,241); line(0,240,x+y+i,240); delay(2000); } } } setcolor(BLACK); line(0,240,640,240); delay(2000); x=240; for(y=0;y<50-30;y++) { putpixel(rand()%640,240,randto(1,15)); } for(i=1,j=3;i<=110;i++,j++) { setcolor(7); line(0,x-i,640,x-i); line(0,x+i,640,x+i); delay(2000); setcolor(WHITE); line(0,x-j,640,x-j); line(0,x+j,640,x+j); delay(2000); setcolor(BLACK); line(0,x-i,640,x-i); line(0,x+i,640,x+i); for(y=0;y<50-30;y++) { putpixel(rand()%640,x-i,randto(1,15)); putpixel(rand()%640,x+i,randto(1,15)); } delay(2000); } setcolor(11); settextstyle(0,0,8); size=imagesize(32,150,383,205); buffer=malloc(size); osize=imagesize(250,270,598,325); buff=malloc(osize); getimage(32,150,383,205,buffer); getimage(250,270,598,325,buff); outtextxy(35,150,"GAME"); outtextxy(350,270,"OVER"); putimage(32,150,buffer,COPY_PUT); putimage(250,270,buff,COPY_PUT); for(i=1;i<=140;i+=5) { putimage(32,150,buffer,COPY_PUT); if(i<=120)putimage(250,270,buff,COPY_PUT); outtextxy(35+i,150,"GAME"); if(i<=120)outtextxy(350-i,270,"OVER"); } getch(); } void ExitGame() { cleardevice(); setbkcolor(BLACK); setcolor(WHITE); outtextxy(180,200,"Thank you for your playing"); sleep(1); outtextxy(240,250,"Good luck!"); sleep(1); closegraph(); } void main() { Init(); begin: InitType(); Display(); Start(); while(sign==1)Select(j); if(sign)ExitGame(); else { GameOver(); goto begin; } }

qq:69558139
2005-04-12 18:58
chengstone
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
帖 子:562
专家分:226
注 册:2004-4-3
收藏
得分:0 
汗~~  这个在我看到你第一个回复的时候已经猜到了 所以我在原代码中改了一下子 不过仔细看过代码之后还是会知道密码是什么地

qq:69558139
2005-04-14 16:52
快速回复:[原创]一个考验你IQ的密码破译游戏,挑战你的逻辑能力
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.037028 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved