Created
November 13, 2012 00:30
-
-
Save jackfoxy/4063029 to your computer and use it in GitHub Desktop.
game type for Monty Hall problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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