Bulls and cows/Player: Difference between revisions

Content added Content deleted
Line 1,471: Line 1,471:
DialogEventSetBool(YES) : fn play( intval( ch ) )
DialogEventSetBool(YES) : fn play( intval( ch ) )
end if
end if
if fn StringIsEqual( ch, @"?" ) then window 2
//if fn StringIsEqual( ch, @"?" ) then window 2
case _btnClick : fn NewGame : window -2
case _btnClick : fn NewGame : window -2
case _windowShouldClose : if tag == 1 then end else window -2 : DialogEventSetBool(YES)
case _windowWillClose : if tag == 1 then end //else window -2 : DialogEventSetBool(YES)
end select
end select
end fn
end fn
Line 1,486: Line 1,486:
{{out}}
{{out}}
[[File:Bull and Cows Solver in FB.png]]
[[File:Bull and Cows Solver in FB.png]]

=={{header|Go}}==
=={{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.
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.