aboutsummaryrefslogtreecommitdiff
path: root/src/computer.rs
diff options
context:
space:
mode:
authorLuis Ferro <luis.ferro@eggplant.io>2019-11-12 14:28:32 +0100
committerLuis Ferro <luis.ferro@eggplant.io>2019-11-12 14:28:32 +0100
commit857d7a8eccec2493163dbb1ae2f45a24a52f108c (patch)
tree5c6837e528b56d9f00dc637fdf1edb962e1b0987 /src/computer.rs
parente7b227ed268e8570518f9d1452b5e7d0d0a0ee32 (diff)
parent8fa3fa881bc3b954e136295fe6cc7022737ae9db (diff)
Fix conflicts
Diffstat (limited to 'src/computer.rs')
-rw-r--r--src/computer.rs36
1 files changed, 0 insertions, 36 deletions
diff --git a/src/computer.rs b/src/computer.rs
deleted file mode 100644
index a8b9b3e..0000000
--- a/src/computer.rs
+++ /dev/null
@@ -1,36 +0,0 @@
-pub struct Computer {
- level: i32,
- difficulty: i32,
-}
-
-pub trait Enemy {
- fn new(level: i32, difficulty: i32) -> Self;
-
- fn action(&self) -> (i32, i32);
-
- fn level_up(&mut self);
-
- fn stats(&self) -> String;
-}
-
-impl Enemy for Computer {
- fn new(level: i32, difficulty: i32) -> Computer {
- Computer {
- level: level,
- difficulty: difficulty
- }
- }
-
- fn action(&self) -> (i32, i32) {
- (self.level, self.difficulty)
- }
-
- fn level_up(&mut self) {
- self.level += 1;
- self.difficulty += 3;
- }
-
- fn stats(&self) -> String {
- format!("level: {} difficulty: {}", self.level, self.difficulty)
- }
-}