| 152 | |
| 153 | |
| 154 | void print_python_example() |
| 155 | { |
| 156 | printf("\n=== Python Equivalent Usage ===\n\n"); |
| 157 | printf("Python code for context reuse:\n\n"); |
| 158 | printf(" from dds3 import SolverContext, solve_board\n\n"); |
| 159 | printf(" # Create context once\n"); |
| 160 | printf(" ctx = SolverContext()\n\n"); |
| 161 | printf(" # Reuse for multiple operations\n"); |
| 162 | printf(" for deal in deals:\n"); |
| 163 | printf(" result = solve_board(deal, context=ctx)\n"); |
| 164 | printf(" print(f'Score: {result[\"score\"]}')\n\n"); |
| 165 | } |
| 166 | |
| 167 | |
| 168 | auto main() -> int |