level 6
Program ex;// By HPF// 2008.10.26Uses crt;Var i, j, x, y, k: longint; a: array [1..10] of record x, y: byte; end; b: array [0..6, 0..5] of boolean; finished: boolean;Procedure printform;begin gotoxy(3, 2); textcolor(white); write(#201); for i:=1 to 40 do write(
#205); write(#
187); for i:=1 to 35 do begin gotoxy(3, 2 + i); write(#186, '':40, #186); end; cursoroff; gotoxy(3, 38); write(#200); for i:=1 to 9 do write(
#205); write(#
181); write('':20); write(#198); for i:=1 to 9 do write(
#205); write(#
188); gotoxy(55, 10); writeln('Hua Rong Dao'); gotoxy(50, 16); textcolor(lightgray); writeln('Press "0".."9" to choose'); gotoxy(52, 18); writeln('Press "'#24
#25#
26#27'" to move');end;Procedure initgame;begin a[1].x := 1; a[1].y := 2; {1--2x2} a[2].x := 3; a[2].y := 2; {2--1x2} a[3].x := 1; a[3].y := 1; {3--2x1} a[4].x := 3; a[4].y := 1; {4--2x1} a[5].x := 1; a[5].y := 4; {5--2x1} a[6].x := 3; a[6].y := 4; {6--2x1} a[7].x := 5; a[7].y := 1; {7--1x1} a[8].x := 5; a[8].y := 2; {8--1x1} a[9].x := 5; a[9].y := 3; {9--1x1} a[10].x := 5; a[10].y := 4; {10-1x1} fillchar(b, sizeof(b), false); b[4, 2] := true; b[4, 3] := true;end;Procedure draw(v: byte);begin textbackground(black); window(4, 3, 44, 37); if (v = 255) or (v = 1) or (y = 1) then begin textbackground(black); gotoxy(a[1].y * 10 - 9, a[1].x * 7 - 6); if x = 1 then textcolor(brown) else textcolor(lightgray); write(' '
#220#
220
#220#
220
#220#
220
#220#
220
#220#
220
#220#
220
#220#
220
#220#
220
#220#
220' '); gotoxy(a[1].y * 10 - 9, a[1].x * 7 - 5); write(#222#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#221); gotoxy(a[1].y * 10 - 9, a[1].x * 7 - 4); write(#222#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#221); gotoxy(a[1].y * 10 - 9, a[1].x * 7 - 3); write(#222#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#221); gotoxy(a[1].y * 10 - 9, a[1].x * 7 - 2); write(#222#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#221); gotoxy(a[1].y * 10 - 9, a[1].x * 7 - 1); write(#222#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#221); gotoxy(a[1].y * 10 - 9, a[1].x * 7 - 0); write(#222#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#221); gotoxy(a[1].y * 10 - 9, a[1].x * 7 + 1); write(#222#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#221); gotoxy(a[1].y * 10 - 9, a[1].x * 7 + 2); write(#222#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#221); gotoxy(a[1].y * 10 - 9, a[1].x * 7 + 3); write(#222#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#221); gotoxy(a[1].y * 10 - 9, a[1].x * 7 + 4); write(#222#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#219#221);
2008年10月26日 15点10分
1
level 6
gotoxy(a[1].y * 10 - 9, a[1].x * 7 + 5); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[1].y * 10 - 9, a[1].x * 7 + 6); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[1].y * 10 - 9, a[1].x * 7 + 7); write(' '#223#223#223#223#223#223#223#223#223#223#223#223#223#223#223#223#223#223' '); if x = 1 then textbackground(brown) else textbackground(lightgray); if x = 1 then textcolor(blue) else textcolor(black); gotoxy(a[1].y * 10 - 1, a[1].x * 7 - 1); write('-0-'); gotoxy(a[1].y * 10 - 3, a[1].x * 7 + 1); write('Cao cao'); end; if (v = 255) or (v = 2) or (y = 2) then begin textbackground(black); gotoxy(a[2].y * 10 - 9, a[2].x * 7 - 6); if x = 2 then textcolor(brown) else textcolor(lightgray); write(' '#220#220#220#220#220#220#220#220#220#220#220#220#220#220#220#220#220#220' '); gotoxy(a[2].y * 10 - 9, a[2].x * 7 - 5); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[2].y * 10 - 9, a[2].x * 7 - 4); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[2].y * 10 - 9, a[2].x * 7 - 3); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[2].y * 10 - 9, a[2].x * 7 - 2); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[2].y * 10 - 9, a[2].x * 7 - 1); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[2].y * 10 - 9, a[2].x * 7); write(' '#223#223#223#223#223#223#223#223#223#223#223#223#223#223#223#223#223#223' '); if x = 2 then textbackground(brown) else textbackground(lightgray); if x = 2 then textcolor(blue) else textcolor(black); gotoxy(a[2].y * 10 - 1, a[2].x * 7 - 4); write('-1-'); gotoxy(a[2].y * 10 - 3, a[2].x * 7 - 2); write('Guan yu'); end; if (v = 255) or (v = 3) or (y = 3) then begin textbackground(black); gotoxy(a[3].y * 10 - 9, a[3].x * 7 - 6); if x = 3 then textcolor(brown) else textcolor(lightgray); write(' '#220#220#220#220#220#220#220#220' '); gotoxy(a[3].y * 10 - 9, a[3].x * 7 - 5); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[3].y * 10 - 9, a[3].x * 7 - 4); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[3].y * 10 - 9, a[3].x * 7 - 3); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[3].y * 10 - 9, a[3].x * 7 - 2); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[3].y * 10 - 9, a[3].x * 7 - 1); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[3].y * 10 - 9, a[3].x * 7 - 0); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[3].y * 10 - 9, a[3].x * 7 + 1); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[3].y * 10 - 9, a[3].x * 7 + 2);
2008年10月26日 15点10分
2
level 6
write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[3].y * 10 - 9, a[3].x * 7 + 3); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[3].y * 10 - 9, a[3].x * 7 + 4); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[3].y * 10 - 9, a[3].x * 7 + 5); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[3].y * 10 - 9, a[3].x * 7 + 6); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[3].y * 10 - 9, a[3].x * 7 + 7); write(' '#223#223#223#223#223#223#223#223' '); if x = 3 then textbackground(brown) else textbackground(lightgray); if x = 3 then textcolor(blue) else textcolor(black); gotoxy(a[3].y * 10 - 6, a[3].x * 7 - 1); write('-2-'); gotoxy(a[3].y * 10 - 7, a[3].x * 7); write('Zhang'); gotoxy(a[3].y * 10 - 6, a[3].x * 7 + 1); write('fei'); end; if (v = 255) or (v = 4) or (y = 4) then begin textbackground(black); gotoxy(a[4].y * 10 - 9, a[4].x * 7 - 6); if x = 4 then textcolor(brown) else textcolor(lightgray); write(' '#220#220#220#220#220#220#220#220' '); gotoxy(a[4].y * 10 - 9, a[4].x * 7 - 5); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[4].y * 10 - 9, a[4].x * 7 - 4); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[4].y * 10 - 9, a[4].x * 7 - 3); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[4].y * 10 - 9, a[4].x * 7 - 2); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[4].y * 10 - 9, a[4].x * 7 - 1); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[4].y * 10 - 9, a[4].x * 7 - 0); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[4].y * 10 - 9, a[4].x * 7 + 1); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[4].y * 10 - 9, a[4].x * 7 + 2); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[4].y * 10 - 9, a[4].x * 7 + 3); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[4].y * 10 - 9, a[4].x * 7 + 4); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[4].y * 10 - 9, a[4].x * 7 + 5); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[4].y * 10 - 9, a[4].x * 7 + 6); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[4].y * 10 - 9, a[4].x * 7 + 7); write(' '#223#223#223#223#223#223#223#223' '); if x = 4 then textbackground(brown) else textbackground(lightgray); if x = 4 then textcolor(blue) else textcolor(black); gotoxy(a[4].y * 10 - 6, a[4].x * 7 - 1); write('-3-'); gotoxy(a[4].y * 10 - 7, a[4].x * 7); write('Zhao'); gotoxy(a[4].y * 10 - 6, a[4].x * 7 + 1); write('yun'); end; if (v = 255) or (v = 5) or (y = 5) then begin textbackground(black); gotoxy(a[5].y * 10 - 9, a[5].x * 7 - 6); if x = 5 then textcolor(brown) else textcolor(lightgray); write(' '#220#220#220#220#220#220#220#220' '); gotoxy(a[5].y * 10 - 9, a[5].x * 7 - 5);
2008年10月26日 15点10分
3
level 6
write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[5].y * 10 - 9, a[5].x * 7 - 4); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[5].y * 10 - 9, a[5].x * 7 - 3); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[5].y * 10 - 9, a[5].x * 7 - 2); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[5].y * 10 - 9, a[5].x * 7 - 1); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[5].y * 10 - 9, a[5].x * 7 - 0); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[5].y * 10 - 9, a[5].x * 7 + 1); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[5].y * 10 - 9, a[5].x * 7 + 2); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[5].y * 10 - 9, a[5].x * 7 + 3); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[5].y * 10 - 9, a[5].x * 7 + 4); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[5].y * 10 - 9, a[5].x * 7 + 5); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[5].y * 10 - 9, a[5].x * 7 + 6); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[5].y * 10 - 9, a[5].x * 7 + 7); write(' '#223#223#223#223#223#223#223#223' '); if x = 5 then textbackground(brown) else textbackground(lightgray); if x = 5 then textcolor(blue) else textcolor(black); gotoxy(a[5].y * 10 - 6, a[5].x * 7 - 1); write('-4-'); gotoxy(a[5].y * 10 - 5, a[5].x * 7); write('Ma'); gotoxy(a[5].y * 10 - 6, a[5].x * 7 + 1); write('Chao'); end; if (v = 255) or (v = 6) or (y = 6) then begin textbackground(black); gotoxy(a[6].y * 10 - 9, a[6].x * 7 - 6); if x = 6 then textcolor(brown) else textcolor(lightgray); write(' '#220#220#220#220#220#220#220#220' '); gotoxy(a[6].y * 10 - 9, a[6].x * 7 - 5); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[6].y * 10 - 9, a[6].x * 7 - 4); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[6].y * 10 - 9, a[6].x * 7 - 3); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[6].y * 10 - 9, a[6].x * 7 - 2); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[6].y * 10 - 9, a[6].x * 7 - 1); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[6].y * 10 - 9, a[6].x * 7 - 0); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[6].y * 10 - 9, a[6].x * 7 + 1); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[6].y * 10 - 9, a[6].x * 7 + 2); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[6].y * 10 - 9, a[6].x * 7 + 3); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[6].y * 10 - 9, a[6].x * 7 + 4); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[6].y * 10 - 9, a[6].x * 7 + 5); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[6].y * 10 - 9, a[6].x * 7 + 6); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[6].y * 10 - 9, a[6].x * 7 + 7);
2008年10月26日 15点10分
4
level 6
write(' '
#223#
223
#223#
223
#223#
223
#223#
223' '); if x = 6 then textbackground(brown) else textbackground(lightgray); if x = 6 then textcolor(blue) else textcolor(black); gotoxy(a[6].y * 10 - 6, a[6].x * 7 - 1); write('-5-'); gotoxy(a[6].y * 10 - 7, a[6].x * 7); write('Huang'); gotoxy(a[6].y * 10 - 7, a[6].x * 7 + 1); write('zhong'); end; if (v = 255) or (v = 7) or (y = 7) then begin textbackground(black); gotoxy(a[7].y * 10 - 9, a[7].x * 7 - 6); if x = 7 then textcolor(brown) else textcolor(lightgray); write(' '
#220#
220
#220#
220
#220#
220
#220#
220' '); gotoxy(a[7].y * 10 - 9, a[7].x * 7 - 5); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[7].y * 10 - 9, a[7].x * 7 - 4); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[7].y * 10 - 9, a[7].x * 7 - 3); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[7].y * 10 - 9, a[7].x * 7 - 2); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[7].y * 10 - 9, a[7].x * 7 - 1); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[7].y * 10 - 9, a[7].x * 7); write(' '
#223#
223
#223#
223
#223#
223
#223#
223' '); if x = 7 then textbackground(brown) else textbackground(lightgray); if x = 7 then textcolor(blue) else textcolor(black); gotoxy(a[7].y * 10 - 6, a[7].x * 7 - 4); write('-6-'); gotoxy(a[7].y * 10 - 6, a[7].x * 7 - 2); write('Zu'); end; if (v = 255) or (v = 8) or (y = 8) then begin textbackground(black); gotoxy(a[8].y * 10 - 9, a[8].x * 7 - 6); if x = 8 then textcolor(brown) else textcolor(lightgray); write(' '
#220#
220
#220#
220
#220#
220
#220#
220' '); gotoxy(a[8].y * 10 - 9, a[8].x * 7 - 5); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[8].y * 10 - 9, a[8].x * 7 - 4); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[8].y * 10 - 9, a[8].x * 7 - 3); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[8].y * 10 - 9, a[8].x * 7 - 2); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[8].y * 10 - 9, a[8].x * 7 - 1); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[8].y * 10 - 9, a[8].x * 7); write(' '
#223#
223
#223#
223
#223#
223
#223#
223' '); if x = 8 then textbackground(brown) else textbackground(lightgray); if x = 8 then textcolor(blue) else textcolor(black); gotoxy(a[8].y * 10 - 6, a[8].x * 7 - 4); write('-7-'); gotoxy(a[8].y * 10 - 6, a[8].x * 7 - 2); write('Zu'); end; if (v = 255) or (v = 9) or (y = 9) then begin textbackground(black); gotoxy(a[9].y * 10 - 9, a[9].x * 7 - 6); if x = 9 then textcolor(brown) else textcolor(lightgray); write(' '
#220#
220
#220#
220
#220#
220
#220#
220' '); gotoxy(a[9].y * 10 - 9, a[9].x * 7 - 5); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[9].y * 10 - 9, a[9].x * 7 - 4); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221);
2008年10月26日 15点10分
5
level 6
gotoxy(a[9].y * 10 - 9, a[9].x * 7 - 3); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[9].y * 10 - 9, a[9].x * 7 - 2); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[9].y * 10 - 9, a[9].x * 7 - 1); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[9].y * 10 - 9, a[9].x * 7); write(' '#223#223#223#223#223#223#223#223' '); if x = 9 then textbackground(brown) else textbackground(lightgray); if x = 9 then textcolor(blue) else textcolor(black); gotoxy(a[9].y * 10 - 6, a[9].x * 7 - 4); write('-8-'); gotoxy(a[9].y * 10 - 6, a[9].x * 7 - 2); write('Zu'); end; if (v = 255) or (v = 10) or (y = 10) then begin textbackground(black); gotoxy(a[10].y * 10 - 9, a[10].x * 7 - 6); if x = 10 then textcolor(brown) else textcolor(lightgray); write(' '#220#220#220#220#220#220#220#220' '); gotoxy(a[10].y * 10 - 9, a[10].x * 7 - 5); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[10].y * 10 - 9, a[10].x * 7 - 4); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[10].y * 10 - 9, a[10].x * 7 - 3); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[10].y * 10 - 9, a[10].x * 7 - 2); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[10].y * 10 - 9, a[10].x * 7 - 1); write(
#222#
219
#219#
219
#219#
219
#219#
219
#219#
221); gotoxy(a[10].y * 10 - 9, a[10].x * 7); write(' '#223#223#223#223#223#223#223#223' '); if x = 10 then textbackground(brown) else textbackground(lightgray); if x = 10 then textcolor(blue) else textcolor(black); gotoxy(a[10].y * 10 - 6, a[10].x * 7 - 4); write('-9-'); gotoxy(a[10].y * 10 - 6, a[10].x * 7 - 2); write('Zu'); end; textbackground(black); for i:=1 to 5 do for j:=1 to 4 do if b[i, j] then for k:=6 downto 0 do begin gotoxy(j * 10 - 9, i * 7 - k); write(' '); end; window(1, 1, 80, 50); y := x;end;Procedure play;var c: char;begin c := readkey; if c in ['0'..'9'] then begin x := ord(c) - ord('0') + 1; end else if c = #0 then begin c := readkey; case ord(c) of 72: begin if (x = 1) or (x = 2) then if b[a[x].x - 1, a[x].y] and b[a[x].x - 1, a[x].y + 1] then begin b[a[x].x - 1, a[x].y] := false; b[a[x].x - 1, a[x].y + 1] := false; b[a[x].x + 2-x, a[x].y] := true; b[a[x].x + 2-x, a[x].y + 1] := true; dec(a[x].x); end; if (x > 2) then if b[a[x].x - 1, a[x].y] then begin b[a[x].x - 1, a[x].y] := false; if x < 7 then b[a[x].x + 1, a[x].y] := true else b[a[x].x, a[x].y] := true; dec(a[x].x); end; end; 80: begin if (x = 1) or (x = 2) then if b[a[x].x + 3-x, a[x].y] and b[a[x].x + 3-x, a[x].y + 1] then
2008年10月26日 15点10分
6
level 6
begin b[a[x].x + 3-x, a[x].y] := false; b[a[x].x + 3-x, a[x].y + 1] := false; b[a[x].x, a[x].y] := true; b[a[x].x, a[x].y + 1] := true; inc(a[x].x); end; if (x > 2) then if b[a[x].x + 1 + ord(x < 7), a[x].y] then begin if x < 7 then b[a[x].x + 2, a[x].y] := false else b[a[x].x + 1, a[x].y] := false; b[a[x].x, a[x].y] := true; inc(a[x].x); end; end; 75: begin if (x = 1) or (3 <= x) and (x <= 6) then begin if b[a[x].x, a[x].y - 1] and b[a[x].x + 1, a[x].y - 1] then begin b[a[x].x, a[x].y - 1] := false; b[a[x].x + 1, a[x].y - 1] := false; b[a[x].x, a[x].y] := true; b[a[x].x + 1, a[x].y] := true; dec(a[x].y); end; end else if (x > 0) then if b[a[x].x, a[x].y - 1] then begin b[a[x].x, a[x].y - 1] := false; if x = 2 then b[a[x].x, a[x].y + 1] := true else b[a[x].x, a[x].y] := true; dec(a[x].y); end; end; 77: begin if (x = 1) or (3 <= x) and (x <= 6) then begin if b[a[x].x, a[x].y + 1] and b[a[x].x + 1, a[x].y + 1] then begin b[a[x].x, a[x].y + 1] := false; b[a[x].x + 1, a[x].y + 1] := false; b[a[x].x, a[x].y] := true; b[a[x].x + 1, a[x].y] := true; inc(a[x].y); end; end else if (x > 0) then if b[a[x].x, a[x].y + 1 + ord(x = 2)] then begin b[a[x].x, a[x].y + 1 + ord(x = 2)] := false; b[a[x].x, a[x].y] := true; inc(a[x].y); end; end; end; textcolor(white); gotoxy(50, 38); case ord(c) of 72: write(x - 1, ' Move UP'); 80: write(x - 1, ' Move DOWN'); 75: write(x - 1, ' Move LEFT'); 77: write(x - 1, ' Move RIGHT'); end; end else x := 0;end;Begin textmode(c80); clrscr; printform; initgame; draw(255); repeat play; draw(x); until finished;End.
2008年10月26日 15点10分
7
level 6
有一些ord(c )变成了ord(c)了,要改过来否则不能编译。如果运行显示混乱请把主程序里的textmode(c80)改成textmode(259)
2008年10月27日 02点10分
8
level 6
我是lz..我错了 上面那个版本是旧的.....下面是新版本。如果吧主在的话麻烦删掉前8楼.
2008年10月29日 10点10分
10