Print board
| 216 | } |
| 217 | /// Print board |
| 218 | virtual void |
| 219 | print(std::ostream& os) const { |
| 220 | int* jump = new int[n*n]; |
| 221 | { |
| 222 | int j=0; |
| 223 | for (int i=0; i<n*n; i++) { |
| 224 | jump[j]=i; j=succ[j].min(); |
| 225 | } |
| 226 | } |
| 227 | os << "\t"; |
| 228 | for (int i = 0; i < n; i++) { |
| 229 | for (int j = 0; j < n; j++) { |
| 230 | os.width(3); |
| 231 | os << jump[f(i,j)] << " "; |
| 232 | } |
| 233 | os << std::endl << "\t"; |
| 234 | } |
| 235 | os << std::endl; |
| 236 | delete [] jump; |
| 237 | } |
| 238 | }; |
| 239 | |
| 240 | /** |