Changed isAttacking to attack method and added implementation to Player class