Changeset - d0b9b2add091
[Not reviewed]
default
0 1 0
Laman - 7 years ago 2018-04-15 17:22:22

handling preset positions (in handicap games)
1 file changed with 10 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/diana.py
Show inline comments
 
@@ -87,6 +87,16 @@ W: {white} {wRank}
 

	
 
	def _setMove(self,k):
 
		self._game=go.Go()
 

	
 
		blackStones=self._record.root.getProp("AB")
 
		whiteStones=self._record.root.getProp("AW")
 
		if blackStones:
 
			for p in blackStones:
 
				self._game.board[p.c][p.r]=BLACK
 
		if whiteStones:
 
			for p in whiteStones:
 
				self._game.board[p.c][p.r]=WHITE
 

	
 
		for i in range(k):
 
			(color,move)=self._moves[i]
 
			if move==tuple(): continue # pass
0 comments (0 inline, 0 general)