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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
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
Play this game by pasting the script in http://www.puzzlescript.net/editor.html |
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
cards = [ | |
#Ironclad | |
{title: 'Bash', belongs_to: 'Ironclad', type_of_card: 'Attack', energy: '2', description: 'Deal 8(10) damage. Apply 2(3) Vulnerable.', rarity: 'Basic'}, | |
{title: 'Defend', belongs_to: 'Ironclad', type_of_card: 'Skill', energy: '1', description: 'Gain 5(8) Block.', rarity: 'Basic'}, | |
{title: 'Strike', belongs_to: 'Ironclad', type_of_card: 'Attack' , energy: '1' , description: 'Deal 6(9) damage.', rarity: 'Basic'}, | |
{title: 'Anger' , belongs_to: 'Ironclad' , type_of_card: 'Attack' , energy: '0' , description: 'Deal 5(7) damage. Add a copy of this card to your discard pile.', rarity: 'Common'}, | |
{title: 'Armaments' , belongs_to: 'Ironclad' , type_of_card: 'Skill' , energy: '1(0)' , description: 'Gain 5 Block. Upgrade a(ALL) card(s) in your hand for the rest of combat.', rarity: 'Common'}, | |
{title: 'Body Slam' , belongs_to: 'Ironclad' , type_of_card: 'Attack' , energy: '1' , description: 'Deal damage equal to your current Block. ', rarity: 'Common'}, | |
{title: 'Clash' , belongs_to: 'I |
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
def letter_count(str) | |
counts = {} | |
str.each_char do |char| | |
next if char == " " | |
counts[char] = 0 unless counts.include?(char) | |
counts[char] += 1 | |
end | |
puts counts.sort_by {|k,v| v}.reverse | |
end |