Overview
SHA1 Hash: | fa2f8e21f20deaf1f39370c573776151808577e7 |
---|---|
Date: | 2012-07-16 07:57:43 |
User: | kinaba |
Comment: | messages to stderr. |
Timelines: | family | ancestors | descendants | both | trunk |
Diffs: | redesign |
Downloads: | Tarball | ZIP archive |
Other Links: | files | file ages | manifest |
Tags And Properties
- branch=trunk inherited from [16f0b5784f]
- sym-trunk inherited from [16f0b5784f]
Changes
Modified src/solver.d from [4176698dd9ba368b] to [469e63844195a7a0].
345 345 // If the future is bad, correct. 346 346 if( plan_state==Tentative_Stuck && plan.length<PredictFuture ) 347 347 replan(); 348 348 349 349 // Follow the predicted plan. 350 350 if( plan.empty ) 351 351 return 'A'; 352 -writeln(plan, " ", plan_state); 352 +stderr.writeln(plan, " ", plan_state); 353 353 char c = plan[0]; 354 354 plan = plan[1..$]; 355 355 current_game.command(c); 356 356 return c; 357 357 } 358 358 359 359 void force(char c) ................................................................................ 388 388 plan_state = (sub_solver.g.dead ? Tentative_Stuck : 389 389 sub_solver.g.cleared ? Fixed : Tentative); 390 390 } 391 391 } 392 392 393 393 void replan() 394 394 { 395 -writeln("replan!"); 395 +stderr.writeln("replan!"); 396 396 // Try to replace every step of the plan by another move. 397 397 Game g = current_game.clone(); 398 398 Tuple!(long, SubSolver, string, int) cand = 399 399 tuple(sub_solver.g.score, sub_solver, plan, Tentative_Stuck); 400 400 for(int i=0; i<plan.length; ++i) { 401 401 foreach(string prefix; ["U","D","L","R","UD","DU","LR","RL"]) 402 402 if(prefix[0] != plan[i]) {