Battleship Game error!


#1

http://www.codeskulptor.org/#user41_vAhfOqgBmO_1.py This is the link to the game.

So ! I Finish my Battleship game, but I went back to fix some of the problems it contains. Well, you enter your guess and they put an "X" mark on the board , but if I enter the same numbers again it won't show up the message "You guessed that one already." It will show "You missed my battleship" message again. What I want is for the "X" mark to remain on the board, so the player knows that he already try to guessed that spot. I've been trying to solve that issue but I can't find the solution. Don't worry about everything else that's on # . I just need the solution to that specific problem. Help will be appreciated.


#2

Hello, @valeria_lopez!

I checked your code, tested a few things and everything seems to be correct.
Of course, the part of your code where you check if the users got the right place or not has to be on a loop instruction but other than that, everything seems to be working just fine.
Here's a screenshot of it:


Maybe there was a problem with the site's program which is used to compile and execute our codes.

Quote me if there's anything else I can help you with!

Best regards,
g4be


#3

Got it ! I wasn't testing the code inside the loop ! Thank you so much !


#4

No problem, Valeria!

Quote me if there's anything I can help you with!

Best regards,
g4be


#5

Alright ! Perfect, thanks :smiley: