Created
January 6, 2019 20:28
-
-
Save cggonzal/d2a95a2b77221075b892755851a33b38 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def UnderAttack(self,position): | |
if(self.attackViaDiagonal(position)): | |
return True | |
if(self.attackViaRow(position)): | |
return True | |
if(self.attackViaCol(position)): | |
return True | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment