\brief Main-function * \relates WordSquare */
| 144 | * \relates WordSquare |
| 145 | */ |
| 146 | int |
| 147 | main(int argc, char* argv[]) { |
| 148 | FileSizeOptions opt("WordSquare"); |
| 149 | opt.size(6); |
| 150 | opt.branching(WordSquare::BRANCH_LETTERS); |
| 151 | opt.branching(WordSquare::BRANCH_WORDS, "words"); |
| 152 | opt.branching(WordSquare::BRANCH_LETTERS, "letters"); |
| 153 | opt.parse(argc,argv); |
| 154 | dict.init(opt.file()); |
| 155 | if (opt.size() > static_cast<unsigned int>(dict.len())) { |
| 156 | std::cerr << "Error: size must be between 0 and " |
| 157 | << dict.len() << std::endl; |
| 158 | return 1; |
| 159 | } |
| 160 | Script::run<WordSquare,DFS,SizeOptions>(opt); |
| 161 | return 0; |
| 162 | } |
| 163 | |
| 164 | // STATISTICS: example-any |