Changeset 150
- Timestamp:
- 04/12/04 18:22:55 (5 years ago)
- Files:
-
- 1 modified
-
06/devel/algosPY.py (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
06/devel/algosPY.py
r148 r150 605 605 whereAreWeCopy = copy(whereAreWe) 606 606 if movelistIndex < self.posTable[index]+4 or not movelist[movelistIndex-2] & ENDOFVARIATION: 607 whereAreWe[-1] -= 1 608 whereAreWeCopy.extend([0,-1]) 607 # whereAreWe[-1] -= 1 608 # print 'X', counter 609 whereAreWeCopy[-1] -= 1 610 whereAreWeCopy.extend([0,0]) 609 611 self.branchpoints.append((deepcopy(dicts), deepcopy(dictsNO), 610 612 deepcopy(contList), deepcopy(contListIndex), counter, … … 619 621 if patternList.get(m[0]).colorSwitch and showColorSwap: 620 622 if searchInVariations: 621 result.append(Hit(dicts[m]['found'], '-', copy(whereAreWe)))623 result.append(Hit(dicts[m]['found'], '-', dicts[m]['whereAreWe'])) 622 624 else: result.append(Hit(dicts[m]['found'], '-')) 623 625 else: 624 626 if searchInVariations: 625 result.append(Hit(dicts[m]['found'], '', copy(whereAreWe)))627 result.append(Hit(dicts[m]['found'], '', dicts[m]['whereAreWe'])) 626 628 else: result.append(Hit(dicts[m]['found'], '')) 627 629 dicts, dictsNO, contList, contListIndex, counter, whereAreWe = self.branchpoints.pop() 628 630 629 631 whereAreWe[-2] += 1 632 # print 'Y' 630 633 # assert whereAreWe[-1] == 0 631 634 … … 668 671 # FIXME: CHECK,was: (patternList[m[0]].colorSwitch or colorSwitch) and showColorSwap: 669 672 if searchInVariations: 670 result.append(Hit(dicts[m]['found'], label+'-', copy(whereAreWe)))673 result.append(Hit(dicts[m]['found'], label+'-', dicts[m]['whereAreWe'])) 671 674 else: result.append(Hit(dicts[m]['found'], label+'-')) 672 675 else: 673 676 if searchInVariations: 674 result.append(Hit(dicts[m]['found'], label, copy(whereAreWe)))677 result.append(Hit(dicts[m]['found'], label, dicts[m]['whereAreWe'])) 675 678 else: result.append(Hit(dicts[m]['found'], label)) 676 679 del dicts[m] … … 684 687 if contListIndex[m] == len(contList[m]): 685 688 dicts[m]['found'] = counter 689 dicts[m]['whereAreWe'] = copy(whereAreWe) 690 print 'found', counter, whereAreWe 686 691 del dicts[m]['foundInitial'] 687 692 else: … … 771 776 if dictsNO[m] == 0 and not dicts[m].has_key('found') \ 772 777 and not dicts[m].has_key('foundInitial'): 773 if contListIndex[m] == len(contList[m]): dicts[m]['found'] = counter 778 if contListIndex[m] == len(contList[m]): 779 dicts[m]['found'] = counter 780 dicts[m]['whereAreWe'] = copy(whereAreWe) 781 print 'found1', counter, whereAreWe 774 782 else: dicts[m]['foundInitial'] = counter 775 783 … … 788 796 if patternList.get(m[0]).colorSwitch and showColorSwap: 789 797 if searchInVariations: 790 result.append(Hit(dicts[m]['found'], '-', copy(whereAreWe)))798 result.append(Hit(dicts[m]['found'], '-', dicts[m]['whereAreWe'])) 791 799 else: 792 800 result.append(Hit(dicts[m]['found'], '-')) 793 801 else: 794 802 if searchInVariations: 795 result.append(Hit(dicts[m]['found'], '', copy(whereAreWe)))803 result.append(Hit(dicts[m]['found'], '', dicts[m]['whereAreWe'])) 796 804 else: 797 805 result.append(Hit(dicts[m]['found'], ''))
