这段程序怎么解释?

来源:百度知道 编辑:UC知道 时间:2024/05/09 08:07:18
void DoWin(int Order)
{
sound(1500);delay(100);
sound(0); delay(50);
sound(800); delay(100);
sound(0); delay(50);
sound(1500);delay(100);
sound(0); delay(50);
sound(800); delay(100);
sound(0); delay(50);
nosound();

textcolor(RED+BLINK);
gotoxy(25,20);
if(Order==CHESS1)
cputs("PLAYER1 WIN!");
else
cputs("PLAYER2 WIN!");
gotoxy(25,21);
cputs(" \\<^+^>/");
getch();
}

int JudgeWin(int Order,struct point Cursor)
{
int i;
for(i=0;i<4;i++)
if(JudgeWinLine(Order,Cursor,i))
return TRUE;
return FALSE;
}

int JudgeWinLine(int Order,struct point Cursor,int direction)
{
int i;
struct point pos,dpos;
const int testnum = 5;
int count;

switch(direction)
{
case 0:
pos.x=Cursor.x-(testnum-1);
pos.y=Cursor

是个游戏代码
DoWin()用来发声,不过参变量order没用着
textcolor(RED+BLINK),调用textcolor(),red+blink是个值,作参数,等效于
y=red+blink
textcolor(y)

其它的自已分析
自已分析才能学到东东