Last active
August 29, 2015 14:06
-
-
Save na74/71886ed888d732d7cf06 to your computer and use it in GitHub Desktop.
code of 最低3ドロップ保証付き陣
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
# 最低3ドロップ保証付き陣 | |
# ex. @data["to"] = [0,1,2,3,4] # 火〜闇 | |
lambda do |drops| | |
new_colors = @data["to"] * 3 | |
new_colors += (30 - new_colors.size).times.map do | |
@data["to"].sample | |
end | |
new_colors.shuffle! | |
drops.each.with_index do |d, i| | |
d.color = new_colors[i] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment