I have to make an labirinth game using an array. I have stucked.Is it possible to change the "gotoxy(28,13);write('*');" with a command telling to place a '*' on (map[10,15] - for example)
I also can't place my array in the center of the dos monitor(24x80 lines) - its moving only the first line of the array at the center... :mad:
Please help me!!!Please!!!
uses wincrt;
var
Map:array[1..22,1..60] of char;
I,J: integer;
begin
for i:=1 to 22 do
begin
for J:=1 to 60 do
begin
map[I,J]:='*';
end;
end;
for I:=1 to 22 do
begin
for J:=1 to 60 do
begin
if (I=1) or (J=1) or (J=60) or (I=22) then
write(map[I,J])
else
write(' ');
end;
writeln;
end;
gotoxy(35,9);write('*'); gotoxy(34,9);write('*'); gotoxy(33,9);write('*'); gotoxy(32,9);write('*');
gotoxy(31,9);write('*'); gotoxy(30,9);write('*'); gotoxy(25,9);write('*'); gotoxy(26,9);write('*');
gotoxy(27,9);write('*'); gotoxy(28,9);write('*'); gotoxy(29,9);write('*'); gotoxy(30,9);write('*');
gotoxy(35,11);write('*'); gotoxy(35,12);write('*'); gotoxy(35,13);write('*');
gotoxy(34,13);write('*'); gotoxy(33,13);write('*'); gotoxy(32,13);write('*'); gotoxy(31,13);write('*');
gotoxy(30,13);write('*'); gotoxy(29,13);write('*'); gotoxy(28,13);write('*'); gotoxy(27,13);write('*');
gotoxy(26,13);write('*'); gotoxy(25,13);write('*');
gotoxy(25,11);write('*'); gotoxy(25,12);write('*'); gotoxy(25,10);write('*');
gotoxy(30,11);
write('#');
gotoxy(10,22);
write('O');
gotoxy(11,22);
write('O');
gotoxy(9,21);write('*'); gotoxy(9,20);write('*'); gotoxy(9,19); write('*'); gotoxy(9,18);write('*');
gotoxy(9,17);write('*'); gotoxy(9,16);write('*');
gotoxy(12,21);write('*'); gotoxy(12,20);write('*'); gotoxy(12,19);write('*'); gotoxy(12,18);write('*');
gotoxy(13,18);write('*'); gotoxy(14,18);write('*'); gotoxy(15,18);write('*'); gotoxy(16,18);write('*');
gotoxy(17,18);write('*'); gotoxy(18,18);write('*');
gotoxy(18,19);write('*'); gotoxy(18,20);write('*'); gotoxy(18,21);write('*');
END.


Sign In
Create Account


Back to top









