Skip to content

Instantly share code, notes, and snippets.

@tene
Created June 12, 2009 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tene/128499 to your computer and use it in GitHub Desktop.
Save tene/128499 to your computer and use it in GitHub Desktop.
use Dancer:from<cardinal>;
class FancyDancer is Dancer {
method description { "is pretty!" }
method steps {
"…·•°•·…"
}
}
class KonamiDancer is Dancer {
method description {
"calls upon ancient powers to heal and inspire"
}
method steps {
"↑↑↓↓←→←→BAselectstart"
}
}
my Dancer $d .= new();
$d.dance();
$d = FancyDancer.new();
$d.dance();
$d = KonamiDancer.new();
$d.dance();
class Dancer
def description()
"My dance is like a beautiful swan, gracefully flying over a lake"
end
def steps()
"⚡→→→→↓↓↓↓←↓→↓←↑↑↑↑→↓←↑Ϟ"
end
def dance()
puts self.WHAT
puts "My dance " + self.description
puts "My dance goes like: " + self.steps
end
end
[sweeks@kweh ~]$ perl6 dance.pl
Dancer()
My dance My dance is like a beautiful swan, gracefully flying over a lake
My dance goes like: ⚡→→→→↓↓↓↓←↓→↓←↑↑↑↑→↓←↑Ϟ
FancyDancer()
My dance is pretty!
My dance goes like: …·•°•·…
KonamiDancer()
My dance calls upon ancient powers to heal and inspire
My dance goes like: ↑↑↓↓←→←→BAselectstart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment