Permalink
Browse files

Porbability and randomness

  • Loading branch information...
1 parent 9b90372 commit b66ad45d0762fe45e66e10848ac364ad851d1477 @suttree committed Mar 2, 2013
Showing with 4 additions and 2 deletions.
  1. +2 −1 castor/castor.rb
  2. +2 −1 pollux/pollux.rb
View
@@ -54,7 +54,8 @@ def self.tidy(text)
end
-if (1 + rand(4) == 4)
+probability = 4
+if (rand(9) > probability)
Castor::taller
else
puts "[castor] Going back to sleep..."
View
@@ -54,7 +54,8 @@ def self.tidy(text)
end
-if (1 + rand(4) == 4)
+probability = 6
+if (rand(9) > probability)
Pollux::taller
else
puts "[pollux] Going back to sleep..."

0 comments on commit b66ad45

Please sign in to comment.