算了
不发源码没人看
源码在此
program color_square; uses crt,mouse; var i,j,k:longint; x,y:integer; tchar:char; stpd,dhpd:boolean; const square_long=18;square_wide=8; square:array [1..square_wide,1..square_long] of char = (('?,'-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','?), ('?,' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','?), ('?,' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','?), ('?,' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','?), ('?,' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','?), ('?,' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','?), ('?,' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','?), ('?,'-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','-','?)); procedure chushihua; begin clrscr; highvideo; cursoroff; textcolor(15); gotoxy(1,1); textbackground(0); clrscr; end; procedure drSQR(tx,ty:integer); var i_wrsqr,j_wrsqr:byte; begin for i_wrsqr:=1 to square_wide do begin for j_wrsqr:=1 to square_long do begin gotoxy(tx+j_wrsqr-1,ty+i_wrsqr-1); write(square[i_wrsqr,j_wrsqr]); if stpd=true then delay(1); if dhpd=true then begin delay(5); keypressed; if keypressed=true then dhpd:=false; end; end; end; end; procedure drmap(zbx,zby:integer); begin for i:=1 to 3 do begin for j:=1 to 4 do begin if not((zbx=j) and (zby=i)) then begin textbackground(3); drsqr((j-1)*19+1,(i-1)*8+1); end else continue; end; end; dhpd:=true; textbackground(4); drsqr((zbx-1)*19+1,(zby-1)*8+1); setmousexy((zbx-1)*19+1,(zby-1)*8+1); showmouse; dhpd:=false; end; procedure start; begin x:=1;y:=1; stpd:=true; drmap(x,y); stpd:=false; while true do begin keypressed; if keypressed=true then begin readkey; tchar:=readkey; if tchar in [chr(80),chr(72),chr(75),chr(77),chr(27),chr(3)] then begin case tchar of chr(72):if y>1 then dec(y); chr(80):if y<3 then inc(y); chr(75):if x>1 then dec(x); chr(77):if x<4 then inc(x); chr(27):halt; chr(3):halt; end; drmap(x,y); end; end; end; end; Begin {main} chushihua; start; end.
2013年06月22日 13点06分
9
为毛程序有语法错误啊??//小尾巴小尾巴小尾巴小小小
2013年06月23日 03点06分
应该不会错吧?
2013年06月23日 12点06分
呃,好吧,浏览器里的那个问号出问题了。
2013年06月23日 12点06分