diff options
author | Griffin Smith <root@gws.fyi> | 2019-07-14T20·20-0400 |
---|---|---|
committer | Griffin Smith <root@gws.fyi> | 2019-07-14T20·20-0400 |
commit | 575a051e6efcd8fd3b0a146f49040e543ae8e5b0 (patch) | |
tree | 3507592582cdffdd73ba7ca9ae893117682581b7 /src/entities/mod.rs | |
parent | e7ad87c7301f266dece36e7558c0f212e370aac6 (diff) |
Implement extremely basic combat
There's a gormlak, you can kill it. That's it.
Diffstat (limited to 'src/entities/mod.rs')
-rw-r--r-- | src/entities/mod.rs | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/src/entities/mod.rs b/src/entities/mod.rs index c4f46bf4a723..ed83f2f462db 100644 --- a/src/entities/mod.rs +++ b/src/entities/mod.rs @@ -1,3 +1,5 @@ +#[macro_use] +pub mod entity; pub mod character; pub mod creature; pub mod entity_char; @@ -5,20 +7,8 @@ pub mod raws; pub use character::Character; pub use creature::Creature; +pub use entity::{Entity, Identified}; pub use entity_char::EntityChar; pub use raws::raw; -use crate::display::Draw; -use crate::types::{Positioned, PositionedMut}; -use downcast_rs::Downcast; -use std::io::{self, Write}; - -pub trait Entity: Positioned + PositionedMut + Draw + Downcast {} - -impl_downcast!(Entity); - -impl Draw for Box<dyn Entity> { - fn do_draw(&self, out: &mut Write) -> io::Result<()> { - (**self).do_draw(out) - } -} +pub type EntityID = u32; |