Run the Monty Hall Problem There’s already been a question about simulating the Monty Hall Problem. This one is different. The user will play the Monty Hall Problem. Your program will play the role of the host. Montybot, if you like.

Here are the steps:  


Pick (randomly) which of the three doors hides the prize.
Output a visual display of three doors. A simple ABC will do. Or three squares. Or whatever.
Receive input choosing one of the doors. This could be a mouse click on the chosen door, or a single letter input (B) or whatever.
Open another door. You do not open the chosen door. You do not open the door hiding the main prize. That may mean you have no choice, or it may mean that you have a choice of two. If you have a choice of two, pick one at random. Visually indicate that the door has been opened and that no prize was hidden behind it. For a program text-based input/output, this could be as simple as outputting AB0, to show that door C has been opened. Feel free to be more inventive. If you’re doing a GUI program, your choice of display is up to you.
Accept input from the user. The user may input stick or switch (or, for a GUI program, click on buttons, or use a select input, or whatever). If the user enters anything other than stick or switch, the implementation is undefined. Do whatever you want.
Output the text You won! or You lost.
Terminate the progam.


Rules:


When you have to choose something at random, don’t worry about cryptographic randomness. Any rand() function will do.
The program must not cheat. The prize must be in place before the game starts. That is to say that the steps must be performed in the order given: First choose a door behind which to hide your prize, then ask the player to choose. The choice of which door to open in step 4 must happen in step 4: it is not selected in advance.
The output in step 6 must be honest.
This is code golf. Shortest code wins.
APL, 77

p←?3⋄d[e[?⍴e←(⍳3)~p,c←⍞⍳⍨⎕←d←3↑⎕A]]←'_'⋄⎕←d⋄⎕←'You','lost' 'won!'[(c=p)=5=⍴⍞]


Needs ⎕IO←0. Tested on Dyalog.

Explanation

p←?3                       ⍝ p(rize) is a random number between 1 and 3
⎕←d←3↑⎕A                   ⍝ d(oors) is the string 'ABC'; output it
c←d⍳⍞                      ⍝ ask for one of the letters; c(hoice) is its position
o←e[?⍴e←(⍳3)~p,c]          ⍝ o(pen) is a random position except for p and c
d[o]←'_'                   ⍝ replace the o position in the d string with a '_'
⎕←d                        ⍝ output the modified d string
w←(c=p)=5=⍴⍞               ⍝ get choice, if it's stick (5 chars) and c=p, or neither, (w)in 
⎕←'You','lost' 'won!'[w]   ⍝ print the result


Examples

      p←?3⋄d[e[?⍴e←(⍳3)~p,c←⍞⍳⍨⎕←d←3↑⎕A]]←'_'⋄⎕←d⋄⎕←'You','lost' 'won!'[(c=p)=5=⍴⍞]
ABC
A
AB_
stick
You lost 
      p←?3⋄d[e[?⍴e←(⍳3)~p,c←⍞⍳⍨⎕←d←3↑⎕A]]←'_'⋄⎕←d⋄⎕←'You','lost' 'won!'[(c=p)=5=⍴⍞]
ABC
A
AB_
stick
You won!