Skip to content

Commit

Permalink
Disabled variation stones
Browse files Browse the repository at this point in the history
  • Loading branch information
inclement committed Jan 6, 2019
1 parent 90e9b37 commit 0ee5ee2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions nogo2/gui/board.kv
Original file line number Diff line number Diff line change
Expand Up @@ -2240,6 +2240,7 @@
color: 1, 1, 1, 1
markup: True
ToggleButton:
size_hint_x: 0.25
text: 'ponder'
disabled: not root.lz_ready
color: 1, 1, 1, 1
Expand Down
12 changes: 7 additions & 5 deletions nogo2/gui/board.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,6 +1023,8 @@ def take_stone_input(self, coords):
#print 'TAKING STONE INPUT',coords,self.navmode
if self.input_mode == 'play':
if tuple(coords) not in self.stones:
self.add_new_stone(coords, 'newvar')
return
existingvars = [
j.get_move() for j in self.abstractboard.curnode
]
Expand Down Expand Up @@ -1604,11 +1606,11 @@ def follow_instructions(self, instructions, *args, **kwargs):
button.background_color = [0, 1, 0, 1]
button.text = 'Next var\n (%d / %d)' % (curvar,
varnum)
if 'varpositions' in instructions:
vars = instructions['varpositions']
for entry in vars:
colour, coord, number = entry
self.add_variation_stone(coord, colour, number)
# if 'varpositions' in instructions:
# vars = instructions['varpositions']
# for entry in vars:
# colour, coord, number = entry
# self.add_variation_stone(coord, colour, number)

t4 = time()

Expand Down

0 comments on commit 0ee5ee2

Please sign in to comment.