From c8dfa0dd03408427fdcc84d0e732717245e253e6 Mon Sep 17 00:00:00 2001 From: 16nlyons <16nlyons@hs15mathstu20.hiltoncsd.net> Date: Wed, 25 May 2016 09:16:39 -0400 Subject: [PATCH] added move method to zombie class --- src/tanks/Tanks.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/tanks/Tanks.java b/src/tanks/Tanks.java index b6e82bb..8ad44f2 100644 --- a/src/tanks/Tanks.java +++ b/src/tanks/Tanks.java @@ -81,7 +81,16 @@ public class Tanks */ private class Zombie extends Enemy { - + public void move() + { + direction = angleToPlayer(p); + super.move(-1); + if(this.checkCollision(p)) + { + enemy.remove(this); + p.takeDamage(); + } + } }