Update Attack.java

sudo code for attack function