Created
September 20, 2012 21:27
-
-
Save arn-e/3758459 to your computer and use it in GitHub Desktop.
Speed Dial Permutation Results
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
speed_dial = SpeedDialPermutations.new | |
puts speed_dial.get_combinations( ["Up","Right","Left","Down"]) | |
# Up,Up,Up,Right (etc.) | |
puts speed_dial.simulate( ["Up","Right","Left","Down"],0.01,6) | |
# Attempt 3 Unsuccessful : Up,Left,Down,Left : Elapsed time : 8.000366121 (etc.) | |
puts speed_dial.average_time( ["Up","Right","Left","Down"],10000,["Up","Down","Left","Right"]) | |
#8.534266573342666 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment