summaryrefslogtreecommitdiff
path: root/src/components.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/components.rs')
-rw-r--r--src/components.rs10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/components.rs b/src/components.rs
index 5bd6ddd..277dd01 100644
--- a/src/components.rs
+++ b/src/components.rs
@@ -13,12 +13,11 @@ use super::pos::Pos;
#[derive(Debug, Clone)]
pub struct Position{
- pub pos: Pos,
- pub prev: Option<Pos>
+ pub pos: Pos
}
impl Position {
pub fn new(pos: Pos) -> Position {
- Position{pos, prev: None}
+ Position{pos}
}
}
@@ -58,12 +57,11 @@ pub struct Moved {
#[derive(Component, Debug, Clone)]
#[storage(HashMapStorage)]
pub struct Player {
- pub name: String,
- pub is_new: bool
+ pub name: String
}
impl Player {
pub fn new(name: String) -> Self {
- Self{name, is_new: true}
+ Self{name}
}
}