Changeset 72
- Timestamp:
- 03/04/04 12:06:02 (5 years ago)
- Files:
-
- 05/devel/kombilo.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
05/devel/kombilo.py
r71 r72 3707 3707 # finished 3708 3708 3709 stoneCount = 0 3710 3709 3711 for i in range(self.sel[0][1], self.sel[1][1]+1): 3710 3712 for j in range(self.sel[0][0], self.sel[1][0]+1): 3711 3713 if not self.board.status.has_key((j,i)): d[(i-1,j-1)] = '.' 3712 elif self.board.status[(j,i)] == 'black': d[(i-1,j-1)] = 'X' 3713 else: d[(i-1,j-1)] = 'O' 3714 elif self.board.status[(j,i)] == 'black': 3715 d[(i-1,j-1)] = 'X' 3716 stoneCount += 1 3717 else: 3718 d[(i-1,j-1)] = 'O' 3719 stoneCount += 1 3714 3720 if self.board.wildcards.has_key((j,i)): d[(i-1,j-1)] = '*' 3715 3721 … … 3739 3745 anchors = [(1, 1), (17-self.sel[1][1]+self.sel[0][1], 3740 3746 17-self.sel[1][0]+self.sel[0][0])] 3747 3748 if self.options.askBeforeLongSearch.get() and \ 3749 ( (stoneCount <= 1) or \ 3750 (stoneCount <= 2 and (self.sel[1][1]-self.sel[0][1]+1)*(self.sel[1][0]-self.sel[0][0]+1) < 30) or\ 3751 (stoneCount <= 3 and (self.sel[1][1]-self.sel[0][1]+1)*(self.sel[1][0]-self.sel[0][0]+1) < 16) ): 3752 if not askokcancel('Time consuming search', 'This search may take quite some time. Continue?'): 3753 return 3741 3754 3742 3755 self.currentSearchPattern = Pattern(anchors, d) … … 6204 6217 variable=self.options.onlyOneMouseButton, 6205 6218 command=self.rebindMouseButtons) 6219 6220 self.options.askBeforeLongSearch = IntVar() 6221 advOptMenu.add_checkbutton(label='Ask before time consuming search', 6222 variable=self.options.askBeforeLongSearch) 6206 6223 6207 6224 advOptMenu.add_command(label='Customize appearance', underline=0,
