1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| //Determine si le roi Projechec peut prendre un pion
function gettel:boolean;
var
dp:integer;
begin
result := false;
for dp := 0 to 7 do
begin
if (poh[dp,1] <> fin) and (sqah[poh[dp,1]] = vid) and ((pohh[poh[dp,1]] and borl <> vid) or (board[poh[dp,1]] and evdh[dpl,dph,hum] = vid)) then
begin
if getouh(poh[dp,1]) then
begin
result := true;
exit;
end;
end;
end;
end;
//Determine si le roi humain peut prendre un pion
function getteh:boolean;
var
dp:integer;
begin
result := false;
for dp := 0 to 7 do
begin
if (pol[dp,1] <> vid) and (sqal[pol[dp,1]] = vid) and ((poll[pol[dp,1]] and borh <> vid) or (board[pol[dp,1]] and evdl[dpl,dph,log] = vid)) then
begin
if getoul(pol[dp,1]) then
begin
result := true;
exit;
end;
end;
end;
end; |
Partager