C++代写/Game编写:CS33901 Software Engineering Spring 2018

C++代写/Game编写:这是一个利用C++编写的游戏,着重在于利用C++进行面向对象编写,涉及了SVN等相关的知识
CS33901 Software Engineering Spring 2018

B. Battleship Game + Object Oriented Modeling
Vision
Battleship is a guessing game for two players. It is played on ruled grids on which the players’ fleets of ships (including battleships) are marked. The locations of the fleet are concealed from the other player. Players alternate turns calling “shots” at the other player’s ships, and the
objective of the game is to destroy the opposing player’s fleet . Functional Requirements
5. Get a copy of the battleship version 0.9 game file (battleship.cpp). Compile the C++ code using g++ and execute it on the wasp.cs.kent.edu or hornet.cs.kent.edu server. Use YOURFLASHLINE account to get an access to the named servers. Play the game enough to understand it and read the simple code. battleship v0.9 is player vs. machine type of a battleship game. Inside the file add your name as the second author.
6. Transform the game to a releasable state after advancing battleship v0.9. The new version runs more like the battleship-game.org online game. The visuals, display, interaction, and sound effects are to be ignored, focus should be more on functionalities.
Main Scenario for battleship v0.1 release:
a. Each player has two grids the ocean grid and the targeting grid
b. Player places their five ships anywhere on their ocean grid horizontally or vertically. You can’t place them diagonally nor may any part of the ship be off the grid. Ship types and number are as follows:
c. A player has the option to choose to place ships manually one by one or random placement of the ships.
d. ThegameisofaPlayervs.aMachinetype,themachinemovesareallrandom, that would include placing the ships and making the shots.
e. Alternating turns one at the time players attack each other by calling out a position on their targeting grid by matching a row and column, for example D4.
Class of Ship
Size (Segments)
Number of Ships
Battleship
4
1
Cruiser
3
2
Destroyer
2
3
Submarine
1
4

f. Grid rows are indexed with numbers (1 to 10) while columns are indexed with letters (A to J). These to be colored white.
g. For each turn, two targeting grids are displayed with appropriate shot updates.
h. If the corresponding coordinate for a shot on the ocean grid is empty, a white flag (white x) is placed into this position on the targeting grid. If the space on the ocean grid has a ship on it, specify which ship was hit then put a red flag (red x) into the position on the targeting grid.
Hint: for coloring text, use ANSI escape code .
i. Ship would sink if all of its segments all got hit.
j. For an empty water segments, use blue equal character (=).
k. The first player to sink all of their opponent’s ships wins!
Non-Functional Requirements
7. You are required to model/engineer the game by applying the object-oriented analysis and design (OOAD) methods and principles you have learned so far in class. The game should be decomposed into C++ classes that would represent the real-world domain problem objects. These objects encapsulate attributes and operations, and interact among each other’s by declaring relationships.
Hint: Classes/Objects to use can be: BattleShipGame, Ship, Submarine, Cruiser, Player, Destroyer, Cruiser, Grid, OceanGrid, TargetingGrid, Random, GridRow, GridColumn, GameDisplay, etc. These domain problem class/object names are only suggested names and not names that you must use.
8. Code compiles with a make using a Makefile8 and runs with ./battleship
Artifacts to Submit
You need to submit the following:
9. A use case diagram that represent the system requirement form 6
(usecase_diagram.png)
10. A textual scenario for each use case in 9 with all possible extensions
(uasecase_scenarios.txt)
8 For help on creating a Makefile check these out:
• How to Create a Simple Makefile
• A tutorial by example

11. A domain model after decomposing (OOA) the game into conceptual objects (domain_model.png)
12. A class diagram of your game design (OOD) (class_diagram.png) 13. An activity diagram that would represent your system scenario
(activity_diagram.png)
14. A sequence diagram for one of the use cases in 9 (sequence_diagram.png) 15. The C++ code (src)
Notes
I. For any text (TXT) or source (CPP, H) files, use a header (example below):
/*—————————————————————–
System Name: Battleship
——————————————————————*/
II. Use draw.io, UMLet, UMLetino, yUML for UML diagraming or any UML tools of your choice. MorededicatedsoftwaresuchasLucidchartsorMicrosoftVisiocanalsobe used. Don’t use hand drawing or something as simple as Microsoft Paint.
III. All diagrams must be submitted as PNG type files. For documents, use TXT type files.
IV. Make multiple commits with adequate messages to show your process/progress
V. Commit all your artifacts into your ses18 class repository, each should be place in the right folder as in the directory tree structure, see VIII.
VI. C++ code should compile and run on wasp/neptune.cs.kent.edu environment
VII. A suggested SSH/SFTP client is BitVise for windows and Cyberduck or SSH under the terminal app for Mac. For an SVN client, you can connect via SSH client to our department servers (wasp/hornet.cs.kent.edu) and they have SVN client installed or you can use TortoiseSVN for windows and SmartSVN for Mac. Linux guys can take care of themselves 🙂
Version: 1.0

VIII. Your directory tree structure should be as the follows, exact names and structure:
.
|– projects
| |– project1
| | |– battleship-v1.0
| | | |–doc
| | |
| | |
| | |
| | |
| | |
| | |
| | | |–src
| |– usecase_scenarios.txt | |– usecase_diagram.png | |– domain_model.png
| |– class_diagram.png
| |– activity_diagram.png | |– sequenced_diagram.png
| | | | |–*.cpp,*.h | | | | |– Makefile |– YOURNAME.txt
Grading
The grade will be broken down as follows:
Points
1, 2, 3, and 4
6
7, 8, 9, 10, 11, 12, 13, 14, and 15
References
Mark
05/100 45/100 50/100
• How to Play: Battleship
• https://battleship-game.org/en/
• http://www.conceptispuzzles.com/index.aspx?uri=puzzle/battleships/rules • https://en.wikipedia.org/wiki/Battleship_(game)

发表评论

电子邮件地址不会被公开。 必填项已用*标注