class Creature def initialize name, hp @name, @hp = name, hp end end class Hostile < Creature def initialize name, hp, ap super name, hp @ap = ap end end
class Creature def initialize name, hp @name, @hp = name, hp end end
class Hostile < Creature def initialize name, hp, ap super name, hp @ap = ap end end
My favorite language is Python, but that lack of parentheses and self variables is beautiful. Speaking of beauty, see http://codex.wordpress.org/Writing_Code_in_Your_Posts
Comments are closed.
Get every new post delivered to your Inbox.
My favorite language is Python, but that lack of parentheses and self variables is beautiful.
Speaking of beauty, see http://codex.wordpress.org/Writing_Code_in_Your_Posts