Skip to content

Instantly share code, notes, and snippets.

Created January 11, 2014 05:00
Show Gist options
  • Save anonymous/8367288 to your computer and use it in GitHub Desktop.
Save anonymous/8367288 to your computer and use it in GitHub Desktop.
Sunk1 = False
Sunk2 = False
if guess_row == ship_row1 and guess_col == ship_col1:
Sunk1 = True
board[guess_row][guess_col] = "S"
print "Congratulations! You sunk my battleship!"
elif guess_row == ship_row2 and guess_col == ship_col2:
Sunk2 = True
board[guess_row][guess_col] = "S"
print "Congratulations! You sunk my battleship!"
# All other conditions thereby fall under "else"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment