This assignment is worth 40% of your total module mark. Your task is to design and implement a simple version of the popular turn-based strategy game “Battleships” (http://en.wikipedia.org/wiki/Battleship_%28game%29) for a single player, with the role of the second player to be taken over by the computer.

In this game each player places a “fleet” of several “ships” onto a 2D grid. On the grid these “ships” are represented by contiguous grid-entries that are placed either horizontally or vertically (but not diagonally) on the grid. Players then take turns guessing grid-positions, trying to locate all ships of the “enemy fleet” and to destroy them by finding all of the grid positions that they occupy. Wrong guesses, i.e. “misses” are remembered to avoid making the same wrong guess twice. The game’s winner is the player who first destroys the other player’s “fleet”.

The development of your program should be broken up into several stages:

  • Stage 1 – Algorithm Design (before the end of February):
    • develop and describe a strategy for placing the computer’s fleet onto the grid
    • develop and describe a strategy for locating ships of the computer’s fleet
    • develop and describe a strategy for “destroying” each located “enemy vessel”
    • from the developed strategies try to formulate algorithms that can then be implemented as C/C++ functions in stage 2.
  • Program & Interface Design & Implementation (starting from March):
    • design the program’s functional interface (how objects and functions interact with one another)
    • design a user interface (this will probably be console/shell based, i.e. using the command-line interface)
    • implement the functionality for the human player
    • implement the functionality for the computer player
    • combine all of the above in the implementation of the final game
  • The look and feel of the user interface is completely up to you.
  • The complexity of the computer player’s algorithms is completely up to you.
  • Better designed and implemented programs will result in better marks.

The final submission should consist of:

  • The work itself, i.e. the program (as a Win32 executable file and any source code and project files required for building the program).
  • Any additional files (design documents, development versions etc.).
  • A short post-mortem analysis (http://www.gdmag.com/write/postmort.htm) of your work, critically reflecting on your work and stating what worked well, what did not work (and why) and what you would do differently if you had to do it again. This text should be written by you: Word-for-word copying of class lecture notes will receive 0 marks in this category. This project post mortem should be no less than 2 pages and up to 4 pages in length.
Academic Honesty!
It is not our intention to break the school's academic policy. Projects posted are only used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly fill out the form. Please provide a valid email address and we'll get back to you in less than 24 hours. We will be sending an invoice through PayPal upon confirmation. We are a non profit organization however we need an amount to keep this organization running, and to be able to complete our research and development.