代写C++代码 代做C++程序 C++辅导 C++教学

C++网络家教 远程写代码 在线Debug 讲解答疑 不是中介,本人直接写

微信: ittutor QQ: 14061936 Email: ittutor@qq.com

导航

Java Battleship

Suppose you want to develop and play a PC-based, single-user, simplified version of battleship (google “battleship game” if you aren’t familiar with it). Just like with most single-user games, you will not play against a real opponent, but rather against a simulated opponent, whose initial map is stored in a text file containing a description of where your opponent’s ships are located The idea is that when your program starts, it will read the description of the opponents map from the file and store it in a 2-d array. The person playing the game, of course, will not see the file or the 2-d array, except at the end of the game. Throughout the game, the player repeated trys to guess where battleships are located by specifying individual map coordinates (just like in the actual game). For each guess, the program will tell the player if they hit or miss. After each time the player makes a guess, the program will print out an “ASCII art” representation of the playing field (the currently known portion of the map). This will allow the player to see their progress as they play the game. 

分页: 首页 1 尾页