1 parent f33ae70 commit e2c2368Copy full SHA for e2c2368
2 files changed
Cargo.toml
@@ -1,6 +1,6 @@
1
[package]
2
name = "manzana-attack"
3
-version = "1.0.0"
+version = "1.1.0"
4
authors = ["lislis <mail@lislis.de>"]
5
6
[[bin]]
src/main.rs
@@ -143,8 +143,11 @@ impl Player {
143
let y = self.y as f64;
144
let x = self.calc_coord(x);
145
let y = self.calc_coord(y);
146
- self.shots.fire();
147
- self.apples.push(Apple::new(x, y));
+ println!("{}", self.shots.left);
+ if self.shots.left > 0 {
148
+ self.shots.fire();
149
+ self.apples.push(Apple::new(x, y));
150
+ }
151
}
152
pub fn update(&mut self) {
153
for a in self.apples.iter_mut() {
0 commit comments