Skip to content

Instantly share code, notes, and snippets.

@jackfoxy
Created November 13, 2012 00:30
Show Gist options
  • Save jackfoxy/4063029 to your computer and use it in GitHub Desktop.
Save jackfoxy/4063029 to your computer and use it in GitHub Desktop.
game type for Monty Hall problem
type game(doorWithPrize: int, fstChoice: int, revealedDoor: int) =
member x.winFstChoice = (doorWithPrize = fstChoice)
member x.winSwitch = (not(doorWithPrize = fstChoice)&&(not(doorWithPrize = revealedDoor)))
member x.revealed = revealedDoor
member x.ToString = "Prize Door: " + doorWithPrize.ToString() + "; "
+ "First Choice: " + fstChoice.ToString() + "; "
+ "Revealed Door: " + revealedDoor.ToString() + "; "
+ "Wins 1st Choice: " + x.winFstChoice.ToString() + "; "
+ "Wins Switch: " + x.winSwitch.ToString()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment