def nextstate(self, board, newboard, player, action): if action == self.gbsize * self.gbsize: return board, -player, newboard b = Phan(self.gbsize, self.win_standard) b.board = np.copy(board) b.board3d = np.copy(newboard) move = (int(action / self.gbsize), action % self.gbsize) b.moving(move, player) b.dim_moving(newboard, board) return b.board, -player, b.board3d
def nextstate(self, board, new_board, player, action): if action == self.gbsize * self.gbsize: return board, -player b = Phan(self.gbsize, self.win_standard) b.board = np.copy(board) b.new_board = np.copy(new_board) move = (int(action / self.gbsize), action % self.gbsize) b.moving(move, player) b.dim_moving(move, player) b.new_board[2] = self.oneminusone(np.copy(b.board), -player) return b.board, -player, b.new_board