Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[bin/crypt] moved 'look' into Adventure::Game

  • Loading branch information...
commit 334a4d709976f8c4b4861a3f47b7e588abdc1b99 1 parent 1c7f6e2
Carl Mäsak authored
Showing with 8 additions and 2 deletions.
  1. +8 −2 bin/crypt
10 bin/crypt
View
@@ -320,6 +320,12 @@ class Adventure::Engine {
@events;
}
+ method look() {
+ my @events = Adventure::PlayerLooked.new(:description_of($!player_location));
+ self!apply($_) for @events;
+ @events;
+ }
+
method place_player($in) {
my @events = Adventure::PlayerWasPlaced.new(:$in);
unless %!seen_room{$in}++ {
@@ -393,8 +399,8 @@ class Crypt::Game {
}
}
- method look() {
- Adventure::PlayerLooked.new(:description_of<clearing>);
+ method look {
+ return $!engine.look;
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.