User Manual

Welcome to Battleship! In this game you are up against a smart AI who is trying to sink all of your ships! You are armed with the top level of guns and have to take him on. Can you sink all of his ships before he gets yours?

Directions:

  1. Launch MATLAB and change the directory to the Battleship game folder by using the file explorer on the left hand side of MATLAB.
  2. Double click the FINAL.m file and hit run up on the ribbon at the top part of the screen.
  3. The command window in the bottom center of the screen should clear and now display a prompt for you to enter your ships.
  4. This prompt will first ask for the direction of the ships, where you have to enter the letter V for vertical or H for horizontal. Hit enter to continue after you enter your response.
  5. From here, the program will ask you to enter the coordinates for where you would like to place your ship. This will be the upper left most part of the ship. If your ship is vertical then the top of the ship is the starting point. If your ship is horizontal, the left of the ship is the starting point. The coordinates are row then column, with row being the number up and down and the column being the number left and right. Hit enter after filling in the row and column prompts
  6. Continue to do steps 4 and 5 till all five ships have been placed. You will know when you are done as a figure window with the two boards should appear. If you inspect the board, you will find that all of your ships are placed exactly where you wanted them!
  7. The command window should now be prompting you to enter the row and column for where you would like to shoot. This follows the same rules as placing the ships, rows being the number up and down and the column being the number left and right. Hit enter after each input of your row and column.
  8. The computer will now prompt you and say it is its turn now, then proceed to fire at your board.
  9. Steps 7 and 8 will be repeated until the game is over which means that all of the ships have been sunk on one of the two boards. When this happens, the game will end with the winner being announced.
  10. You have just finished a game of Battleship!

To play another game after finishing your last, click Run in the top ribbon again. This will restart the game and prompt you for ships again.

Have fun playing Battleship!