Skip to content

Commit

Permalink
[bin/crypt] player actually moves when walking
Browse files Browse the repository at this point in the history
:)
  • Loading branch information
Carl Masak committed Jul 4, 2012
1 parent df5be0e commit 4d8064f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions bin/crypt
Expand Up @@ -292,6 +292,9 @@ class Adventure::Engine {
my $direction = .direction;
%!exits{$room1}{$direction} = $room2;
}
when Adventure::PlayerWalked {
$!player_location = .to;
}
}
}

Expand Down Expand Up @@ -570,6 +573,16 @@ multi MAIN('test') {
};
}

{
my $game = Crypt::Game.new();

$game.walk('east');
throws_exception
{ $game.walk('east') },
X::Adventure::NoExitThere,
'the player actually moves to the next room';
}

done;
}

Expand Down

0 comments on commit 4d8064f

Please sign in to comment.