random.rb

Path: lib/random.rb
Last Update: Fri May 11 16:18:12 -0400 2007

About

Random is a class like no other. Random allows you do to fun things like ‘random.sentence’ and ‘random.position’. It takes no quarter. It asks for no parameters.

Usage

  random = Random.new

For an overview on the Grammar system, please head over to the Grammar class. These are just mainly helper functions that interact with Grammar. For example,

  random.sentence 'SENTENCE'

That would pull a random SENTENCE line out of your rules.txt, automatically replacing capitalized words with their rules.txt counterparts.

  random.item 'NOUN'

That function pulls a random NOUN out. Some other randomness might randomly be added at a random point in time.

[Validate]