Jump to content

Bulls and cows/Player: Difference between revisions

Line 1,471:
DialogEventSetBool(YES) : fn play( intval( ch ) )
end if
//if fn StringIsEqual( ch, @"?" ) then window 2
case _btnClick : fn NewGame : window -2
case _windowShouldClose_windowWillClose : if tag == 1 then end //else window -2 : DialogEventSetBool(YES)
end select
end fn
Line 1,486:
{{out}}
[[File:Bull and Cows Solver in FB.png]]
 
=={{header|Go}}==
Notes: Strategy per the suggestion in the problem description. Check algorithm lifted from Bulls and cows program. Code here uses Go's built in map type as the container for the list of still-possible numbers; only the map key is used, the value is assigned a dummy of 0.
68

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.