diff options
author | Iago Garrido <iago086@gmail.com> | 2019-11-12 15:05:03 +0100 |
---|---|---|
committer | Iago Garrido <iago086@gmail.com> | 2019-11-12 15:05:03 +0100 |
commit | 91970c9d14a471184a327937b88cbb6227d072f1 (patch) | |
tree | 587a227cb151455c703bec6cdebfadd3583f8d74 | |
parent | 76fc41b3c803ad4db3c19a76d408ab301438aa1e (diff) |
rename property to clarify
-rw-r--r-- | src/state.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/state.rs b/src/state.rs index 20b49d7..f2ec249 100644 --- a/src/state.rs +++ b/src/state.rs @@ -5,18 +5,18 @@ use crate::entities::{Character, Entity}; use crate::world::{Dungeon, Generatable, Level}; pub struct State { - pub character: Character, + pub player: Character, pub dungeon: Dungeon, pub level: usize, } impl State { pub fn new( - character: Character, + player: Character, dungeon: Dungeon, - ) -> State { + ) -> Self { State { - character: character, + player: player, dungeon: dungeon, level: 0, } @@ -24,7 +24,7 @@ impl State { pub fn init(&mut self) { self.dungeon.generate(); - self.character.place(self.current_level().get_start_point()); + self.player.place(self.current_level().get_start_point()); } pub fn debug(&self) { |