TeensyMud - 'A ruby mud server.'

TestFormatting

Page for testing formatting

Header level 1

Header level 2

Header level 3

Header level 4

Header level 5
Header level 6
# Header level 7 - there ought not be one

ftp://sourcery.dyndns.org/pub/

kitty

Scrap of Ruby code -

  # produces a statistical report of the database
  # [+return+] a string containing the report
  def stats
    rooms = objs = players = 0
    @db.values.each do |val|
      case val
      when Room
        rooms += 1
      when Player
        players += 1
      when GameObject
        objs += 1
      end
    end
    stats=<<EOH
[COLOR=cyan]
---* Database Statistics *---
  Rooms   - #{rooms}
  Players - #{players}
  Objects - #{objs}
  Total Objects - #{rooms+objs+players}
  Highest OID in use - #{@dbtop}
---*                     *---
[/COLOR]
EOH
    return stats
  end