summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRose Hogenson <rosehogenson@posteo.net>2025-04-12 21:46:21 -0700
committerRose Hogenson <rosehogenson@posteo.net>2025-04-12 21:46:21 -0700
commitb6e617dff1e712aac10888a2781484eeb2e99e89 (patch)
tree414adc72d4dacdc28ed38e928c0642ae5a3b6569 /src
parentc222109441b7cd779cbf3b440a4f3fdb45918965 (diff)
downloadstallman-shooter-main.tar.zst
Bump depsHEADmain
Diffstat (limited to 'src')
-rw-r--r--src/gates.rs3
-rw-r--r--src/state.rs5
2 files changed, 0 insertions, 8 deletions
diff --git a/src/gates.rs b/src/gates.rs
index 7f6bd9f..2451daa 100644
--- a/src/gates.rs
+++ b/src/gates.rs
@@ -194,9 +194,6 @@ impl state::Enemy<GatesBullet> for Gates {
fn health(&self) -> f64 {
self.health
}
- fn set_health(&mut self, health: f64) {
- self.health = health;
- }
fn injure(&mut self, damage: f64) {
self.health -= damage;
}
diff --git a/src/state.rs b/src/state.rs
index be89d3d..2a82294 100644
--- a/src/state.rs
+++ b/src/state.rs
@@ -76,7 +76,6 @@ pub trait Enemy<T>: Drawable {
fn new() -> Self;
fn act(&mut self, count: u64) -> Vec<T>;
fn health(&self) -> f64;
- fn set_health(&mut self, health: f64);
fn injure(&mut self, damage: f64);
}
@@ -110,10 +109,6 @@ pub trait Positioned {
fn x(&self) -> i32;
fn y(&self) -> i32;
fn radius() -> i32;
- fn contains(&self, x: i32, y: i32) -> bool {
- let d = dist(self.x(), self.y(), x, y);
- d <= Self::radius() as f64
- }
fn overlaps<T: Positioned>(&self, other: &T) -> bool {
let sx = self.x();
let ox = other.x();