Changing/Keeping original groups
Here are the "offical" rules of battleship.
You are to design classes that will allow battleship to be played with the following scenarios.
You should develop all .h files you'll need. Your classes should concentrate on behavior. You should have no (or little) private/protected data in your classes. At this point in the programming proces you're concentrating on the interactions between the classes you develop and the interactions between these classes and view/GUI/network code you might be provided.
Your classes should be flexible in accommodating boards of different sizes, ships of different sizes, and rules of ship placement. For example, in some versions of battleship two ships cannot be placed so that they are adjacent. In other versions such placement is possible.
You should submit as part of your README extensive documentation on how you think your design will accommodate the criteria specified above. You should also provide documentation on how to program different games of battleship using your classes. Included in this documentation, ideally, will be sample code that shows how your classes will be used in different situations. For the initial design, you should show how your classes will facilitate playing solo against a computer's ships. You might, for example, provide code like this:
Battleship game; Player * p = new KeyboardPlayer(); game.makeBoard(); while (! game.over()) { game.showBoard(); Move m = p->getMove(); game.makeMove(m); } game.showResults();Please don't have your code resemble this unless you think it's a great design. I spent two minutes on it, so it's probably not great. I didn't check it with a compiler.
In addition to solo play, you should provide documentation/code that shows how your program can be used in a text-based game, a GUI environment, or perhaps over the Internet via a CGI program (all solo).
Ideally you'll also provide documentation that shows how your code/classes can be used to play against the computer, or over a network against another player.
submit_cps108 battledesign *.h README other-files-as-needed