def do_move(self, action, color=None):
		color = color or self.current_player
		if self.is_legal(action):
			# reset ko
			self.ko = None
			if action is not PASS_MOVE:
				(x, y) = action
				self.board[x][y] = color
				self._update_neighbors(action)
				# check neighboring groups' liberties for captures
				for (nx, ny) in self._neighbors(action):
					if self.board[nx, ny] == -color and len(self.liberty_sets[nx][ny]) == 0:
						# capture occurred!
						captured_group = self.group_sets[nx][ny]
						num_captured = len(captured_group)
						self._remove_group(captured_group)
						if color == BLACK:
							self.num_white_prisoners += num_captured
						else:
							self.num_black_prisoners += num_captured
						# check for ko
						if num_captured == 1:
							# it is a ko iff, were the opponent to play at the captured position,
							# it would recapture (x,y) only
							# (a bigger group containing xy may be captured - this is 'snapback')
							would_recapture = len(self.liberty_sets[x][y]) == 1
							recapture_size_is_1 = len(self.group_sets[x][y]) == 1
							if would_recapture and recapture_size_is_1:
								# note: (nx,ny) is the stone that was captured
								self.ko = (nx, ny)
			else:
				if color == BLACK:
					self.passes_black += 1
				if color == WHITE:
					self.passes_white += 1
			# next turn
			self.current_player = -color
			self.turns_played += 1
			self.history.append(action)
		else:
			raise IllegalMove(str(action))
		# Check for end of game
		if len(self.history) > 1:
			if self.history[-1] is None and self.history[-2] is None \
				and self.current_player == WHITE:
				self.is_end_of_game = True
		return self.is_end_of_game
Play stone at action=(x,y). If color is not specified, current_player is used
dataset/ETHPy150Open Rochester-NRT/RocAlphaGo/AlphaGo/go.py/GameState.do_move