* check if movelist is valid

This commit is contained in:
peter 2004-03-14 20:06:17 +00:00
parent 682b148f4c
commit 56c727153a

View File

@ -1077,7 +1077,8 @@ implementation
items at a time. Therefore, we split the movelist into a sorted
and an unsorted part and search through both. If the unsorted part
becomes too large, we sort.}
if assigned(reginfo[u].movelist) then
begin
{We have to weigh the cost of sorting the list against searching
the cost of the unsorted part. I use factor of 8 here; if the
number of items is less than 8 times the numer of unsorted items,
@ -1085,6 +1086,9 @@ implementation
with reginfo[u].movelist^ do
if count<8*(count-sorted_until) then
sort_movelist(reginfo[u].movelist);
if assigned(reginfo[v].movelist) then
begin
for n:=0 to reginfo[v].movelist^.count-1 do
begin
{Binary search the sorted part of the list.}
@ -1112,6 +1116,8 @@ implementation
l1:
end;
end;
end;
end;
enable_moves(v);
@ -2009,7 +2015,10 @@ implementation
end.
{
$Log$
Revision 1.122 2004-02-12 15:54:03 peter
Revision 1.123 2004-03-14 20:06:17 peter
* check if movelist is valid
Revision 1.122 2004/02/12 15:54:03 peter
* make extcycle is working again
Revision 1.121 2004/02/09 20:12:23 olle