Anonymous user
Monty Hall problem: Difference between revisions
→{{header|Eiffel}}
Line 735:
live_contestant: attached like contestant
-- Attached version of `contestant'
do
if attached contestant as al_contestant then
Line 749:
active_stage_door (a_door: like door_anchor): attached like door_anchor
-- Attached version of `
do
if attached a_door as al_door then
Line 772:
-- Prepare the stage in terms of what doors have what prizes.
do
inspect new_random_of (
when 1 then
door_1 := door_with_car
Line 793:
not active_stage_door (door_2).is_goat or
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
|