Học tại trường Chưa có thông tin
Đến từ Chưa có thông tin , Chưa có thông tin
Số lượng câu hỏi 2
Số lượng câu trả lời 0
Điểm GP 0
Điểm SP 0

Người theo dõi (0)

Đang theo dõi (0)


Chủ đề:

Lập trình đơn giản

Câu hỏi:

Program Game_Bong_Da;
uses crt,dos;
const
ChieuRong = 60;
ChieuCao = 23;
KhoangCachDong = 1;
KhoangCachCot = 0;
ChieuRongKhungThanh = 8;

SoCauThu = 8;

Front = 1;
BeHind = 2;
Left = 3;
Right = 4;

Tocdo = 15;

type
TSanBong = object
Procedure VeSanBong;
Procedure KhoiTaoCauThu;
end;
TViTri = object
X, Y : integer;
Procedure SetViTri(vtX, vtY: integer);
end;
TGioiHan = object
X1, X2, Y1, Y2 : integer;
Procedure SetGioiHan(vtX1, vtY1, vtX2, vtY2 : integer);
end;

TBong = object
Sohuu : array[0..2,0..SoCauThu] of Boolean;
Vitri : TVitri;
Procedure SetSoHuu(doi, ten : integer);
Procedure InBong(doi, caut, Huong : integer);
Procedure CanBong;
Procedure SutBong(Huong : integer);
Function HuongChuyenBong(doi, caut : integer) : integer;
Procedure XuLi;
end;

TCauThu = object
Doi : integer;
Ten : integer;
GioiHan : TGioiHan;
Vitri : TVitri;
MauAo : Word;
KeyPress : Char;

Procedure SetCauThuHT;
Procedure InHinh(vtX,vtY : integer);
Procedure GianhBong;
Procedure DichuyenNgauNhien;
Procedure DiChuyen(Key : char);
end;
TMayTinh = object
CauThuHT : array[1..2] of integer;
PT : Boolean;
Procedure KiemTra;
Procedure TanCong;
Procedure PhongThu;
end;

var
LastHuong,HuongChuyen,CauThuHT : integer;
san : TSanBong;
cauthu : array[1..2,1..SoCauThu] of TCauThu;
QBong : TBong;
DangSut,vtMax,DangChuyen : Boolean;
DiemSo : array[1..2] of integer;
MayTinh : TMayTinh;

procedure setcusor(bot,top: byte);
var regs : registers;
begin
regs.ah := 1;
regs.ch:= bot;
regs.cl:= top;
intr($10, regs);
end;

Procedure TViTri.SetVitri(vtX, vtY : integer);
Begin
X := vtX;
Y := vtY;
End;

Procedure TGioiHan.SetGioiHan(vtX1, vtY1, vtX2, vtY2 : integer);
Begin
X1 := vtX1;
Y1 := vtY1;
X2 := vtX2;
Y2 := vtY2;
End;

(*==============S Bong===============================*)
Procedure TBong.SetSoHuu(doi, ten: integer);
var d,t : integer;
Begin
for d := 0 to 2 do
for t := 0 to SoCauThu do
begin
if (d = doi) and (t = ten) then
SoHuu[d, t] := True
else
SoHuu[d, t] := False;
end;
End;

Procedure TBong.InBong(doi, caut, Huong : integer);
Begin
if (QBong.SoHuu[doi, caut]) and (not DangSut) then
begin
if LastHuong <> Huong then
begin
GotoXy(Vitri.X,Vitri.Y);
Write(#32);
end;
case Huong of
Front : begin
TextColor(white);
Vitri.X := CauThu[doi,caut].Vitri.X;
Vitri.Y := CauThu[doi,caut].Vitri.Y-1;
GotoXy(Vitri.X,Vitri.Y);
Write(#265);
end;
BeHind : begin
TextColor(white);
Vitri.X := CauThu[doi,caut].Vitri.X;
Vitri.Y := CauThu[doi,caut].Vitri.Y+1;
GotoXy(Vitri.X,Vitri.Y);
Write(#265);
end;
Left : begin
TextColor(white);
Vitri.X := CauThu[doi,caut].Vitri.X - 1;
Vitri.Y := CauThu[doi,caut].Vitri.Y;
GotoXy(Vitri.X,Vitri.Y);
Write(#265);
end;
Right : begin
TextColor(white);
Vitri.X := CauThu[doi,caut].Vitri.X + 1;
Vitri.Y := CauThu[doi,caut].Vitri.Y;
GotoXy(Vitri.X,Vitri.Y);
Write(#265);
end;
end;
LastHuong := Huong;
if (Vitri.Y <= Khoangcachdong+1) or
(Vitri.Y >= KhoangCachDong+ChieuCao) or
(Vitri.X <= KhoangCachcot+1) or
(Vitri.X >= KhoangCachcot + chieurong) then
begin
vtMax := True;
DangSut := True;
end;
CanBong;
end;
End;

Procedure TBong.SutBong(Huong : integer);
Begin
if not vtMax then
begin
GotoXy(Vitri.X,Vitri.Y);
Write(#32);
end;
case Huong of
Front : if Vitri.Y > Khoangcachdong+1 then
begin
TextColor(white);
Vitri.X := Vitri.X;
Vitri.Y := Vitri.Y-2;
GotoXy(Vitri.X,Vitri.Y);
Write(#265);
end;
BeHind :if Vitri.Y < Khoangcachdong+ChieuCao then
begin
TextColor(white);
Vitri.X := Vitri.X;
Vitri.Y := Vitri.Y+2;
GotoXy(Vitri.X,Vitri.Y);
Write(#265);
end;
Left :if Vitri.X > KhoangcachCot+1 then
begin
TextColor(white);
Vitri.X := Vitri.X - 2;
Vitri.Y := Vitri.Y;
GotoXy(Vitri.X,Vitri.Y);
Write(#265);
end;
Right :if Vitri.X < KhoangcachCot+ChieuRong then
begin
TextColor(white);
Vitri.X := Vitri.X + 2;
Vitri.Y := Vitri.Y;
GotoXy(Vitri.X,Vitri.Y);
Write(#265);
end;
end;
if (Vitri.Y <= Khoangcachdong+1) or
(Vitri.Y >= KhoangCachDong+ChieuCao) or
(Vitri.X <= KhoangCachcot+1) or
(Vitri.X >= KhoangCachcot + chieurong) then
begin
vtMax := True;
end;
CanBong;
Cauthu[1,1].SetCauThuHT;
End;

Procedure TBong.CanBong;
var doi,caut : integer;
Begin
for doi := 1 to 2 do
for caut := 1 to Socauthu do
begin
if (CauThu[doi,caut].Vitri.X = Vitri.X)
and (CauThu[doi,caut].Vitri.Y = Vitri.Y) then
begin
SetSoHuu(doi,caut);
if CauThu[doi,caut].Vitri.Y > ChieuCao div 2 then
begin
InBong(doi,caut,Front);
Cauthu[doi,caut].Vitri.Y := Cauthu[doi,caut].Vitri.Y-1;
end
else
begin
InBong(doi,caut,Behind);
Cauthu[doi,caut].Vitri.Y := Cauthu[doi,caut].Vitri.Y+1;
end;
TextColor(Cauthu[doi,caut].MauAo);
GotoXy(Cauthu[doi,caut].Vitri.X,CauThu[doi,caut].Vitri.Y);
Write(#258);
DangSut := False;
DangChuyen := False;
end;
end;
end;

Function TBong.HuongChuyenBong(doi, caut : integer) : integer;

var ct,Min,Tam,Huong : integer;
Begin
Min := ChieuRong+ChieuCao;
for ct := 1 to SoCauThu do
if ct <> caut then
begin
Tam := Cauthu[doi, ct].Vitri.X - Cauthu[doi, caut].Vitri.X;
if Abs(Min) > Abs(Tam) then
begin
Min := Tam;
if Min < 0 then Huong := Left
else if Min > 0 then Huong := Right;
end;
Tam := Cauthu[doi, ct].Vitri.Y - Cauthu[doi, caut].Vitri.Y;
if Abs(Min) > Abs(Tam) then
begin
Min := Tam;
if Min < 0 then Huong := Front
else if Min > 0 then Huong := BeHind;
end;
HuongChuyenBong := Huong;
end;

End;

Procedure TBong.XuLi;
Begin
if (vtMax) and (Vitri.X >= CauThu[1,1].GioiHan.X1)
and (Vitri.X <= CauThu[1,1].GioiHan.X2)
and (DangSut or Dangchuyen) then
begin
DangSut := False;
DangChuyen := False;
vtMax := False;

if (Vitri.Y > ChieuCao div 2) then
begin
Inc(DiemSo[2]);
SetSoHuu(1,1);
Cauthu[1,CauThuHT].MauAo := Green;
CauThuHT:=1;
InBong(1,CauThuHT,Front);
end
else
begin
Inc(DiemSo[1]);
SetSoHuu(2,1);
InBong(2,1,BeHind);
end;
San.VeSanBong;
TextColor(Cyan);
GoToXy(65,7); Write(' Cau Thu : ',CauThuHT);
goToxy(65,9); Write(' May : ',DiemSo[2]);
goToxy(65,11);Write('Nguoi Choi : ',DiemSo[1]);
end
else
if vtMax then
begin
SetSoHuu(0,0);
ViTri.SetVitri(ChieuRong div 2 + KhoangCachCot,
chieuCao div 2 + KhoangCachDong);
Textcolor(White);
GotoXy(Vitri.X,Vitri.Y);write(#265);
San.VeSanBong;
DangSut := False;
DangChuyen := False;
vtMax := False;
end;
Textcolor(Red);
GotoXy((ChieuRong + KhoangCachCot - 20) div 2,(ChieuCao + KhoangCachDong) div 2);
if diemSo[1] >= 10 then
begin
Write('Nguoi Choi Thang Roi.');
readln;
Cauthu[1,CauThuHT].KeyPress := #27;
end
else if diemso[2] >= 10 then
begin
Write('May Thang Roi.');
readln;
Cauthu[1,CauThuHT].KeyPress := #27;
end;
end;
(*==============E Bong===============================*)

(*==============S San Bong===========================*)
Procedure TSanBong.KhoiTaoCauThu;
var Vt : TViTri;
i : integer;
Begin
CauThu[2,1].Doi := 2;
CauThu[1,1].Doi := 1;
CauThu[1,1].Ten := 1;
CauThu[2,1].Ten := 1;
for i := 2 to SoCauThu do
begin
CauThu[1,i].GioiHan.SetGioiHan(KhoangCachCot+2,KhoangCachDong+2,
KhoangCachCot+ChieuRong-1,KhoangCachDong+ChieuCao-1);
CauThu[1,i].MauAo := Green;
Cauthu[1,i].Doi := 1;
CauThu[1,i].Ten := i;
CauThu[2,i].GioiHan.SetGioiHan(KhoangCachCot+2,KhoangCachDong+2,
KhoangCachCot+ChieuRong-1,KhoangCachDong+ChieuCao-1);
CauThu[2,i].MauAo := Blue;
Cauthu[2,i].Doi := 2;
CauThu[2,i].Ten := i;
end;
for i := 1 to SoCauThu do
begin
repeat
Vt.X := RanDom(Cauthu[1,i].GioiHan.X2+1) + KhoangCachCot;
Vt.Y := Random(CauThu[1,i].GioiHan.Y2+1) + KhoangCachDong;
until (Vt.X >= Cauthu[1,i].GioiHan.X1)
and (Vt.X <= CauThu[1,i].GioiHan.X2)
and (Vt.Y >= CauThu[1,i].GioiHan.Y1)
and (Vt.Y <= Cauthu[1,i].GioiHan.Y2);
CauThu[1,i].Vitri := Vt;
Vt.SetViTri(0, 0);
end;

for i := 1 to SoCauThu do
begin
repeat
Vt.X := RanDom(Cauthu[2,i].GioiHan.X2+1) + KhoangCachCot;
Vt.Y := Random(Cauthu[2,i].GioiHan.Y2+1) + KhoangCachDong;
until (Vt.X >= Cauthu[2,i].GioiHan.X1)
and (Vt.X <= CauThu[2,i].GioiHan.X2)
and (Vt.Y >= CauThu[2,i].GioiHan.Y1)
and (Vt.Y <= Cauthu[2,i].GioiHan.Y2);
CauThu[2,i].Vitri := Vt;
Vt.SetViTri(0, 0);
end;
for i := 1 to SoCauThu do
begin
TextColor(cauthu[1,i].MauAo);
gotoxy(cauthu[1,i].vitri.X,cauthu[1,i].Vitri.Y);
Write(#258);
TextColor(cauthu[2,i].MauAo);
gotoxy(cauthu[2,i].vitri.X,cauthu[2,i].Vitri.Y);
Write(#258);
end;
End;

Procedure TSanBong.VeSanBong;
var i: integer;
Begin
clrscr;
TextColor(Yellow);
for i := 1 to ChieuRong do
begin
GotoXy(KhoangCachCot + i,KhoangCachDong);
Write(#177);
GotoXy(KhoangCachCot + i,KhoangCachDong+ChieuCao+1);
Write(#177);
end; { Ve Khung Ngang }

for i := 1 to ChieuCao do
begin
GotoXy(KhoangCachCot + 1,KhoangCachDong + i);
Write(#177);
GotoXy(KhoangCachCot + ChieuRong,KhoangCachDong+i);
Write(#177);
end; { Ve Khung Doc }

TextColor(LightGreen);
i := (ChieuRong - ChieuRongKhungThanh) div 2 + KhoangCachCot;
GotoXy(i,KhoangCachDong+1);
CauThu[1,1].GioiHan.SetGioiHan(i,KhoangCachDong+ChieuCao -
1 - ChieuRongKhungThanh div 2,
i+ChieuRongKhungThanh-1,KhoangCachDong+ChieuCao - 1);
{ Set Gioi Han Thu Mon}
CauThu[1,1].MauAo := LightGreen;
for i := 1 to ChieuRongKhungThanh do
Write(#177);
{ Ve Khung Thanh May}
TextColor(Cyan);
i := (ChieuRong - ChieuRongKhungThanh) div 2 + KhoangCachCot;
GotoXy(i,KhoangCachDong+ChieuCao);
CauThu[2,1].GioiHan.SetGioiHan(i,KhoangCachDong+2,
i+ChieuRongKhungthanh-1,ChieuRongKhungThanh div 2+KhoangCachDong+2);
{Set Gioi Han Thu Mon}
CauThu[2,1].MauAo := Cyan;
for i := 1 to ChieuRongKhungThanh do
Write(#177); { Ve Khung Thanh Nguoi Choi}
KhoiTaoCauThu;
TextColor(Cyan);
GoToXy(65,7); Write(' Cau Thu : ',CauThuHT);
goToxy(65,9); Write(' May : ',DiemSo[1]);
goToxy(65,11);Write('Nguoi Choi : ',DiemSo[2]);
Delay(1000);
End;
(*==============E San Bong===========================*)

(*==============S Cau Thu============================*)
Procedure TCauThu.SetCauThuHT;
var i,min,tamthoi1,tamthoi2,cautht: integer;
TroLai : boolean;
Begin
TroLai := True;
if (not Qbong.Sohuu[1,CauThuHT]) or (QBong.soHuu[0,0]) then
TroLai := False;
if not TroLai then
begin
Min := ChieuRong + ChieuCao;
cautht := CauThuHT;
for i := 1 to SoCauThu do
begin
tamthoi1 := Cauthu[doi,i].Vitri.X - QBong.Vitri.X;
tamthoi2 := Cauthu[doi,i].Vitri.Y - QBong.Vitri.Y;
if ABs(Min) > (ABs(TamThoi1)+Abs(Tamthoi2)) then
begin
Min := TamThoi1+Tamthoi2;
cautht := i;
end;
end;
if (cautht = 1) and ((QBong.Vitri.X < Cauthu[doi,cautht].GioiHan.X1)
or (QBong.Vitri.X > Cauthu[doi,cautht].GioiHan.X2) or
(QBong.Vitri.Y < Cauthu[doi,cautht].GioiHan.Y1) or
(QBong.Vitri.Y > Cauthu[doi,cautht].GioiHan.Y2)) then
cautht := 2;

if (CauThuHT = 1) and (doi = 2) then
CauThu[doi,CauThuHT].MauAo := Cyan
else if (CauThuHT <> 1) and (doi = 2) then
CauThu[doi,CauThuHT].MauAo := Blue
else if (CauThuHT = 1) and (doi = 1) then
CauThu[doi,CauThuHT].MauAo := LightGreen
else if (CauThuHT <> 1) and (doi = 1) then
CauThu[doi,CauThuHT].MauAo := Green;
CauThuHT := cautht;
TextColor(Cyan);
GoToXy(65,7);Write(' Cau Thu : ',CauThuHT);
end;
end;

Procedure TCauThu.InHinh(vtX, vtY : integer);
Begin
GotoXy(Vitri.X,Vitri.Y);
Write(#32);
Vitri.X := vtX;
Vitri.Y := vtY;
TextColor(MauAo);
GotoXy(Vitri.X,Vitri.Y);
Write(#258);
End;

Procedure TCauThu.GianhBong;
Begin
if not Qbong.SoHuu[Doi,Ten] then
begin
if (Qbong.Vitri.X = Vitri.X-1) and (Qbong.Vitri.Y = Vitri.Y) then
begin
SetCauthuHT;
Qbong.SetSoHuu(Doi,Ten);
Qbong.InBong(Doi,Ten,Front);
end
else if (Qbong.Vitri.X = Vitri.X+1) and (Qbong.Vitri.Y = Vitri.Y) then
begin
SetCauthuHT;
Qbong.SetSoHuu(Doi,Ten);
Qbong.InBong(Doi,Ten,Front);
end
else if (Qbong.Vitri.X = Vitri.X) and (Qbong.Vitri.Y = Vitri.Y-1) then
begin
SetCauthuHT;
Qbong.SetSoHuu(Doi,Ten);
Qbong.InBong(Doi,Ten,Front);
end
else if (Qbong.Vitri.X = Vitri.X) and (Qbong.Vitri.Y = Vitri.Y+1) then
begin
SetCauthuHT;
Qbong.SetSoHuu(Doi,Ten);
Qbong.InBong(Doi,Ten,Front);
end;
end;
end;

Procedure TCauThu.DiChuyenNgauNhien;
var Phim : integer;
Key : Char;
Begin
Phim := Random(7);
case Phim of
1 : begin
Key := #72;
end;
2 : begin
Key := #75;
end;
3 : begin
Key := #77;
end;
4 : begin
Key := #80;
end;
5 : begin
Key := #32;
end;
6 : begin
Key := #13;
end;
end;
KeyPress := Key;
End;

Procedure TCauThu.DiChuyen(Key : char);
Begin
case Key of
#72,#119:if (vitri.Y > GioiHan.Y1) then
begin
InHinh(Vitri.X,ViTri.Y - 1);
QBong.InBong(Doi,Ten, Front);
GianhBong;
delay(Tocdo);
end;
#80,#115:if (Vitri.Y < GioiHan.Y2) then
begin
InHinh(Vitri.X,Vitri.Y+1);
QBong.InBong(Doi,Ten, BeHind);
GianhBong;
delay(Tocdo);
end;
#75,#97: if (vitri.X > GioiHan.X1) then
begin
InHinh(Vitri.X-1,vitri.Y);
QBong.InBong(Doi,Ten, Left);
GianhBong;
delay(Tocdo);
end;
#77,#100:if (Vitri.X < GioiHan.X2) then
begin
InHinh(ViTri.X+1,ViTri.Y);
QBong.InBong(Doi,Ten, Right);
GianhBong;
delay(Tocdo);
end;
#13 : if QBong.SoHuu[doi,ten] then begin
QBong.SetSoHuu(0, 0);
DangSut := True;
end;
#32 : if QBong.SoHuu[doi,ten] then begin
QBong.SetSoHuu(0, 0);
DangChuyen := True;
HuongChuyen := QBong.HuongChuyenBong(doi,ten);
end;
end;
End;
(*==============E Cau Thu============================*)
(*==============S May Tinh===========================*)
Procedure TMayTinh.KiemTra;
var ct,Min,Tamthoi,caut : integer;
Begin
Min := ChieuCao + ChieuRong;
for ct := 1 to SoCauThu do
begin
TamThoi := Abs(CauThu[2,ct].Vitri.X - QBong.Vitri.X)
+ Abs(CauThu[2,ct].Vitri.Y - QBong.Vitri.Y);
if (Min) > TamThoi then
begin
Min := TamThoi;
caut := ct;
end;
end;
CauThuHT[1] := caut;

Min := ChieuCao + ChieuRong;
for ct := 1 to SoCauThu do
if (ct <> CauthuHT[1]) then
begin
TamThoi := Abs(CauThu[2,ct].Vitri.X - QBong.Vitri.X)
+ Abs(CauThu[2,ct].Vitri.Y - QBong.Vitri.Y);
if (Min > TamThoi) then
begin
Min := TamThoi;
caut := ct;
end;
end;
CauThuHT[2] := caut;
end;

Procedure TMayTinh.TanCong;
var i,ct,j : integer;
begin
ct := 0;
KiemTra;
for i := 1 to 2 do
if QBong.Sohuu[2,CauThuHT[i]] then
ct := i;
i := ct;
PT := True;
if i <> 0 then
begin
PT := False;
if (CauThu[2,CauThuHT[i]].Vitri.Y < CauThu[1,1].GioiHan.Y2) then
begin
CauThu[2,CauThuHT[i]].DiChuyen(#80);
end
else
if (CauThu[2,CauThuHT[i]].Vitri.X < (CauThu[1,1].GioiHan.X2
+ CauThu[1,1].GioiHan.X1) div 2) then
begin
CauThu[2,CauThuHT[i]].DiChuyen(#77);
end
else
if (CauThu[2,CauThuHT[i]].Vitri.X > (CauThu[1,1].GioiHan.X2
+ CauThu[1,1].GioiHan.X1) div 2) then
begin
CauThu[2,CauThuHT[i]].DiChuyen(#75);
end;
for j := 1 to SoCauthu do
if j <> i then
Begin
CauThu[2,j].DiChuyenNgauNhien;
CauThu[2,j].Dichuyen(Cauthu[2,j].KeyPress)
end;
end;
end;

Procedure TMayTinh.PhongThu;
var i,j: integer;
Begin
KiemTra;
PT := False;
for i := 1 to 2 do
if (not QBong.Sohuu[2,CauThuHT[i]]) and (not QBong.SoHuu[1,1]) then
begin
if (CauThu[2,CauThuHT[i]].Vitri.Y < QBong.Vitri.Y) then
begin
CauThu[2,CauThuHT[i]].DiChuyen(#80);
end
else
if (CauThu[2,CauThuHT[i]].Vitri.Y > QBong.Vitri.Y) then
begin
CauThu[2,CauThuHT[i]].DiChuyen(#72);
end
else
if (CauThu[2,CauThuHT[i]].Vitri.X < QBong.Vitri.X-1) then
begin
CauThu[2,CauThuHT[i]].DiChuyen(#77);
end
else
if (CauThu[2,CauThuHT[i]].Vitri.X > QBong.Vitri.X+1) then
begin
CauThu[2,CauThuHT[i]].DiChuyen(#75);
end;
PT := True;
for j := 1 to SoCauthu do
if j <> i then
Begin
CauThu[2,j].DiChuyenNgauNhien;
CauThu[2,j].Dichuyen(Cauthu[2,j].KeyPress)
end;
end;
end;

(*==============E May Tinh===========================*)

Procedure NewGame;
Begin
clrscr;
SetCusor(32,0);
San.VeSanBong;
QBong.SetSoHuu(0, 0);
TextColor(White);
Qbong.vitri.SetVitri(ChieuRong div 2 + KhoangCachCot,
chieuCao div 2 + KhoangCachDong);
GotoXy(QBong.Vitri.X,QBong.Vitri.Y);
Write(#265);
CauthuHT := 2;
DangSut := False;
DangChuyen := False;
end;

Procedure PlayerPlay;
var i : integer;
Begin
Cauthu[1,CauThuHT].MauAo := Red;
if Keypressed then
begin
Cauthu[1,CauThuHT].KeyPress := readkey;
for i := 1 To SoCauThu do
if i <> CauThuHT then
Cauthu[1,i].DichuyenNgauNhien;
end;
Cauthu[1,CauThuHT].DiChuyen(Cauthu[1,CauThuHT].KeyPress);
for i := 1 To SoCauThu do
if i <> CauThuHT then
Cauthu[1,i].Dichuyen(Cauthu[1,i].KeyPress);
if Dangsut then QBong.SutBong(LastHuong)
else if DangChuyen then QBong.SutBong(HuongChuyen);
MayTinh.PhongThu;
MayTinh.TanCong;
QBong.XuLi;
Cauthu[1,1].SetCauThuHT;
end;

BEGIN
NewGame;
repeat
PlayerPlay;
if MayTinh.PT then
until Cauthu[1,CauThuHT].KeyPress = #27;
END.

*Bậc cmn thầy*

Enter:Sút

space: chuyền

a,s,d,w: di chuyển

* dán vô notepad rồi sau đó đổi đuôi thành .pas nhá. bỏ vào đường link nè:

link: C:\FPC\2.0.4\bin\i386-win32

Lập trình hoàn toàn bằng pascal nhá.

Bậc cmn thầy