From 398d23d73e147bf0b5acdf0e4c80d7130a508dcf Mon Sep 17 00:00:00 2001 From: Iago Garrido Date: Tue, 12 Nov 2019 15:05:03 +0100 Subject: rename property to clarify --- src/state.rs | 10 +++++----- 1 file 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) { -- cgit v1.2.3