Created
April 9, 2013 20:13
-
-
Save Troush/5348985 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 do_attack(board,pos): | |
x,y = pos | |
for row in range(len(board)): | |
if board[row][y] == 1 and row != x: | |
return True | |
for col in range(len(board)): | |
if board[x][col] == 1 and col != y: | |
return True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment