{*********************************************
** H(orizon)V(ertical)S(mall) のペアの検査
** []空集合になれば False を返す。
** 更新
**********************************************}
function TForm1.HVS_pare_Check():boolean;
var
i,j,cnt : integer;
begin
result := true;
for i := low(KnAry) to high(KnAry) do
for j := low(KnAry[i]) to high(KnAry[i]) do
begin
cnt := count_shugo(KnAry[i,j]);
//memo1.Lines.Add(intToStr(cnt));
if ( cnt = 2) and (DArray[i,j] = 0) then
begin
if H_pare_check(point(i,j)) then
begin
if V_pare_CHeck(Point(i,j)) then
begin
if S_pare_Check(Point(i,j)) then
result := True
else
begin
result := False;
exit;
end;
end
else
begin
result := False;
exit;
end;
end
else
begin
result := False;
exit;
end;
end;
end;
end;
|
集合配列のすべてを調査
集合の要素数を数える
要素数が二つでマス目が決まっていないもの
← 水平方向の調査
← 垂直方向の調査
← 小ブロックエリアの調査
結果 [ ] 空集合になったら False を返す
中止。
矛盾あり
|