Added IsSquareAttacked code