diff options
Diffstat (limited to 'src/entities.rs')
-rw-r--r-- | src/entities.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/entities.rs b/src/entities.rs index d462fa9..80e1235 100644 --- a/src/entities.rs +++ b/src/entities.rs @@ -90,7 +90,8 @@ impl Entity for Character { }
fn move_by(&mut self, movement: Movement) -> Result<(), String> {
- self.previous_location = apply_movement(self.location, movement)?;
+ self.previous_location = self.location;
+ self.location = apply_movement(self.location, movement)?;
Ok(())
}
|