Welcome to the Battleship game! We have developed this mythical game, in which you will play against the machine.
You will get a board with your randomly placed ships, and an empty one with your opponent's HIDDEN ships, also randomly placed. You will have to enter coordinates, such as: B3 to try to sink all the ships of the chosen one.
If you guess right, you will have the opportunity to roll again. If you fail, the turn will pass to your enemy, who will shoot at your ships in an attempt to sink them. To win you have to sink all his ships before he sinks yours.
Random
Numpy
Math
Game rules: The objective is to sink all the ships in your object by shooting. We have generated the first shot randomly, you will have to write some coordinates (for example: B3), and the program will tell you if it has hit an opposing ship, or on the contrary, if the shot has been in the water. If you hit, your turn will be repeated and you can shoot again, if you miss, the turn passes to the machine that will do the same: it will fire a shot, in this case at random, and if it hits one of your ships, it will shoot again, in case it fails, the turn comes back to you, and so on until finally, one of you manages to shoot down all of your opponent's ships.
> It's a very fun and dynamic game!<
At all times you will see how your board is, and how your opponent is, and you will be able to see where you have shot, if you have managed to hit a boat, as if your shot has gone into the water.
When it's the machine's turn to shoot, it also shows the shots it's been shooting, but it doesn't show its board, so you don't cheat :P.
Finally, when one of the two manages to shoot down their opponent's ships, a message celebrating the victory is displayed on the screen.
Authors:
- Manuel Romoleroux Rivero
- Laura García Sánchez