Created
December 1, 2008 21:25
-
-
Save tene/30852 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub use_skill { | |
my $id = gen_new_answer_id(); | |
$answers->{$id} = sub { | |
my ($response) = @_; | |
my $skill = choose($response->{skills}); | |
send('use_skill',$skill); | |
} | |
send('get', $id, 'skills'); | |
} | |
sub handle_answer { | |
my ($id, $response) = @_; | |
my &c = $answers->{$id}; | |
&c($response); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment