Skip to content

Commit

Permalink
removed: done TODOs
Browse files Browse the repository at this point in the history
  • Loading branch information
micutio committed Oct 16, 2020
1 parent 7a664f0 commit 7d72fbe
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/core/game_objects.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ impl GameObjects {
}
}

// TODO: Add function that returns iterator over all tiles.
pub fn get_tile_at(&mut self, x: usize, y: usize) -> &mut Option<Object> {
// offset by one because player is the first object
&mut self.obj_vec[(y * (WORLD_WIDTH as usize) + x) + 1]
Expand Down
4 changes: 0 additions & 4 deletions src/entity/action.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
//! Any action is supposed to be assigned to one of the three trait families (sensing, prcessing,
//! actuating) of an object
// TODO: Create actions for setting and using quick/primary/secondary actions.

use std::fmt::Debug;

use tcod::colors;
Expand Down Expand Up @@ -68,7 +66,6 @@ pub enum ActionResult {

/// Prototype for all actions.
/// They need to be `performable` and have a cost (even if it's 0).
/// TODO: Add target here and remove action prototypes!
#[typetag::serde(tag = "type")]
pub trait Action: ActionClone + Debug {
fn perform(
Expand Down Expand Up @@ -227,7 +224,6 @@ impl Action for AttackAction {
}

/// Move an object
// TODO: Maybe create enum target {self, other{object_id}} to use for any kind of targetable action.
#[derive(Debug, Serialize, Deserialize, Clone)]
pub struct MoveAction {
lvl: i32,
Expand Down
1 change: 0 additions & 1 deletion src/entity/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ pub struct Object {
next_action: Option<Box<dyn Action>>,
default_action: Box<dyn Action>,
quick_action: Box<dyn Action>,
// TODO: add default action to walk mapping!
}

#[derive(Debug, Serialize, Deserialize, Default)]
Expand Down
3 changes: 0 additions & 3 deletions src/test/ai.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ use crate::core::world::world_gen::Tile;
use crate::entity::action::MoveAction;
use crate::entity::genetics::{Actuators, Dna, Processors, Sensors};

// TODO: test walking in any direction
// TODO: test walking in only one possible direction
// TODO: test blocked by monsters => only can pass
// TODO: extend available actions and tests to include attacking

#[test]
Expand Down

0 comments on commit 7d72fbe

Please sign in to comment.