- added basic tests for cell, direction, entity, action
- fixed bugs
This commit is contained in:
2024-05-24 16:35:25 +02:00
parent 012d6322e3
commit 6030ba0b73
3 changed files with 299 additions and 4 deletions

View File

@@ -127,6 +127,13 @@ impl Entity {
self.effects.push_back(effect);
}
/// Permette di vedere tutti gli effetti che in questo momento sono applicati all'entità.\
/// Gli effetti qui elencati sono in uno stato di attesa prima di essere effettivamente
/// applicati tremite la funzione update.
pub fn get_effects(& self) -> impl Iterator<Item = &Box<dyn Effect>> {
self.effects.iter()
}
/// Indica se l'entità è considerata ancora in gioco o meno.\
/// Per far si che l'entità non sia più in gioco bisobna far arrivare la vita a 0.
/// Nota: una entità con vita negativa è considerata "viva"