Created
January 11, 2014 05:00
-
-
Save anonymous/8367288 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
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