Monty Hall problem: Difference between revisions
Content added Content deleted
Line 735: | Line 735: | ||
live_contestant: attached like contestant |
live_contestant: attached like contestant |
||
-- Attached version of contestant |
-- Attached version of `contestant' |
||
do |
do |
||
if attached contestant as al_contestant then |
if attached contestant as al_contestant then |
||
Line 749: | Line 749: | ||
active_stage_door (a_door: like door_anchor): attached like door_anchor |
active_stage_door (a_door: like door_anchor): attached like door_anchor |
||
-- Attached version of ` |
-- Attached version of `a_door'. |
||
do |
do |
||
if attached a_door as al_door then |
if attached a_door as al_door then |
||
Line 772: | Line 772: | ||
-- Prepare the stage in terms of what doors have what prizes. |
-- Prepare the stage in terms of what doors have what prizes. |
||
do |
do |
||
inspect ( |
inspect new_random_of (3) |
||
when 1 then |
when 1 then |
||
door_1 := door_with_car |
door_1 := door_with_car |
||
Line 793: | Line 793: | ||
not active_stage_door (door_2).is_goat or |
not active_stage_door (door_2).is_goat or |
||
not active_stage_door (door_3).is_goat |
not active_stage_door (door_3).is_goat |
||
consistent_door_numbers: active_stage_door (door_1).number = 1 and |
|||
active_stage_door (door_2).number = 2 and |
|||
active_stage_door (door_3).number = 3 |
|||
end |
end |
||