Created
April 2, 2011 17:03
-
-
Save 0branch/899655 to your computer and use it in GitHub Desktop.
entity.pl, second draft
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use feature 'say'; | |
use Entity; | |
use Player; | |
my $lamp = Entity->new(name => "lamp"); | |
my $player = Player->new; | |
say $player->list_inventory; | |
$player->obtain($lamp); | |
say $player->list_inventory; | |
# but: | |
$player->obtain($player); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment