38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
|
# File 'lib/lotrd/v-leaderboard.rb', line 38
def render_board
rows = []
rows << ['Gold:', @gold]
rows << ['Bank Balance:', @balance]
rows << ['Max Health:', @hp]
rows << ['Strength:', @str]
rows << ['Intelligence:', @int]
rows << ['Agility:', @agi]
rows << ['Dexterity:', @dex]
rows << ['Luck:', @lck]
@weapon == nil ? nil : rows << ['Weapon:', @weapon]
@armour == nil ? nil : rows << ['Armour:', @armour]
@achievement == [] ? nil : rows << ['Achievements:', @achievement]
titleStyle = Artii::Base.new :font => 'slant'
table = Terminal::Table.new :title => "#{(titleStyle.asciify(@name)).colorize(:yellow)}", :headings => ['Stat', 'Points'], :rows => rows
puts table
end
|