# gnuWorldOrder_435

> Episode of [GNU World Order Linux Cast](https://podistic.com/podcast/gnu-world-order-linux-cast.md) · Published November 21, 2021

- **Listen on Podistic:** https://podistic.com/episode/gnuworldorder-435
- **Audio:** http://gnuworldorder.info//audiophile/gnuWorldOrder_435.m4a (audio/m4a)

## About this episode

The RCS revision control system and Ruby. Here is the code from this episode:

    
    
    #!/usr/bin/env ruby
    
    class Character
      def initialize(name,role,lvl)
        hp = rand(8)+1
        @spells = ["cantrip", "chill touch", "detect undead"]
        puts("You are #{name}, a level #{lvl} #{role}")
      end #init
    
      def listspells()
        puts("#{@spells}")
      end #list
    
      def spellcast(n)
        puts("You cast #{@spells[n]}")
        dice = rand(20) + 1
    
        if dice < 10 then
          puts("Your spell pops and fizzles. Nothing happens.")
        else
          puts("Your spell does #{dice} damage.")
        end #if
      end #spellcast
    end #class
    
    if __FILE__ == $0 then
      pc = Character.new("Bob","Wizard",1)
      pc.listspells()
      pc.spellcast(1)
      pc.spellcast(0)
    end
    

 shasum -a256=a74e1f1ab22923b03397be10d9fe44afdf33faca034c321ea3b658061199396f
