Skip to content

Instantly share code, notes, and snippets.

@Troush
Created April 9, 2013 20:13
Show Gist options
  • Save Troush/5348985 to your computer and use it in GitHub Desktop.
Save Troush/5348985 to your computer and use it in GitHub Desktop.
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