Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C Programming You will be divided into teams. Your team will design a program that will be used to play Valencia Battleship. Valencia Battleship is

C Programming

You will be divided into teams. Your team will design a program that will be used to play Valencia Battleship. Valencia Battleship is played on a 10 x 10 grid. The game begins with the five ships (see below) being placed randomly somewhere in the 10 x 10 grid. You will not know the location of the ships, they will be randomly placed.

The 5 Ships in the game:

1. (S) Seminole State Ship (3 Holes)

2. (A) Air Force Academy (5 Holes)

3. (V) Valencia Destroyer (4 Holes)

4. (E) Eskimo University (3 Holes)

5. (D) Deland High School (2 Holes)

When the game starts, the screen will look as shown below.

image text in transcribed

The player will either fire a missile or quit the game. If they fire a missile, you will place an H if they hit a ship or an M if they miss a ship. You will adjust the missile counters. Once a ship has been sunk, you will replace the H in the sunk ship with the letter pertaining to the sunk ship. You will now show the ship as sunk.

Placing Ships

Ships cannot collide with other ships. No overlapping. Ships cannot run off the game board.

MAIN MENU

image text in transcribed

GAME PLAY

The goal is for the player to sink all ships with while using the least amount of missiles possible. A perfect game will use 17 missiles.

  1. Starts a new game from scratch.
  2. If an previous game was not finish, you can resume here, otherwise inform the user and start a new game
  3. You will show the top 10 best scores sorted from best to not best. Remember the lower the score the better. You will display the top 10 scores to both the screen and to a text file named topTenScores.txt. The text file will live in the src folder.
  4. If they quit, you will preserve what needs to be preserved and exit.

A B C D E F GH J 2 4 9 [10] Floating Floating Floating Floating Floating Missiles fired 0 Seminole State Airforce Academy Valencia Destroyer Eskimo University Deland High School Ship Hits Ship Misses 0 Enter (Letter followed by Number or QQ to quit] _ A B C D E F GH J 2 4 9 [10] Floating Floating Floating Floating Floating Missiles fired 0 Seminole State Airforce Academy Valencia Destroyer Eskimo University Deland High School Ship Hits Ship Misses 0 Enter (Letter followed by Number or QQ to quit] _

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft Visual Basic 2008 Comprehensive Concepts And Techniques

Authors: Gary B. Shelly, Corinne Hoisington

1st Edition

1423927168, 978-1423927167

More Books

Students also viewed these Databases questions

Question

What is a standardized normal curve?

Answered: 1 week ago