>>> while(((white_pass && black_pass ) == true) || tree_deep == 1000) "while" should be "until".
-Hideki WSK: <[EMAIL PROTECTED]>: >Am 17.06.2008, 20:37 Uhr, schrieb Zach Wegner <[EMAIL PROTECTED]>: > >> On Mon, Jun 16, 2008 at 4:42 PM, WSK <[EMAIL PROTECTED]> >> wrote: >> >>> program oh_iam_sooo_quick_and_dirty; >>> >>> //get_input_move(input); >>> . >>> . >>> . >>> do >>> { >>> set_randomseed(); //sic! :) >>> do >>> { >>> color = black; >>> if("pass" == play_random_move(color); // pass only if >>> there are NO VALID moves on board anymore! >>> black_pass = true; >>> else { >>> set_move_to_tree(tree); //more complicated!!! >>> black_pass = false; > } > color = white; > >>> if("pass" == play_random_move(color); // pass only if there are >>> NO VALID moves on board anymore! >>> white_pass = true; >>> else { >>> set_move_to_tree(tree); //more complicated!!! > white_pass = false; >>> } > tree_deep++; > } >>> while(((white_pass && black_pass ) == true) || tree_deep == 1000) >>> set_next_root_tree(input); >>> } >>> while(time <= 10 sec) >>> . >>> . >>> . >>> program ends; >> >> A few small errors I see: >> >> 1. It should be while (pass < 2) >> 2. It should be while (time < 10 sec) >> 3. The way you do it only detects the end of the game when white >> passes, then black passes. If black passes and then white does, it >> won't catch it. >> 4. Black plays before white > >1.+2.: Yes, its cleaner ;) > >3. Oh! Youre right, thanks! Hope it works now. > >4. Not a bug a feature! :) Because the first input would be black. But >for transparency I edit it. > >Comments are welcome! (RFC if you want, lol) > >Greets > >> _______________________________________________ >> computer-go mailing list >> computer-go@computer-go.org >> http://www.computer-go.org/mailman/listinfo/computer-go/ > > >_______________________________________________ >computer-go mailing list >computer-go@computer-go.org >http://www.computer-go.org/mailman/listinfo/computer-go/ -- [EMAIL PROTECTED] (Kato) _______________________________________________ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/