def _oneGame(self, preset = None):
        """ a single black stone can be set as the first move. """
        self.env.reset()
        if preset != None:
            self.env._setStone(GomokuGame.BLACK, preset)
            self.env.movesDone += 1
            self.env.playToTheEnd(self.opponent, self.player)
        else:
            self.env.playToTheEnd(self.player, self.opponent)
        moves = self.env.movesDone
        win = self.env.winner == self.player.color
        if self.verbose:
            print(('Preset:', preset, 'T:', self.temp, 'Win:', win, 'after', moves, 'moves.'))
        res = 1 - self.numMovesCoeff * (self.minmoves -moves)/(self.maxmoves-self.minmoves)
        if win:
            return res
        else:
            return -res
dataset/ETHPy150Open pybrain/pybrain/pybrain/rl/environments/twoplayergames/tasks/relativegomokutask.py/RelativeGomokuTask._oneGame/swapped operands of `-`