0% found this document useful (0 votes)
15 views2 pages

Excercise 1 - Battleships Game

task

Uploaded by

ohriaahaan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views2 pages

Excercise 1 - Battleships Game

task

Uploaded by

ohriaahaan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Spreadsheets – Exercise 1 Game: Battleships

Battleships is a classic two-player game where the objective is to sink your opponent's fleet of ships
before they sink yours. Each player places a set of ships on a grid and takes turns guessing the
locations of the opponent's ships. When a player correctly guesses a location, it is marked as a hit;
otherwise, it is marked as a miss. Points are awarded based on the number of cells occupied by each
ship.

To do:

Create an interactive and visually appealing Battleships game in Excel. Use your Excel skills to design
the game grid, apply conditional formatting, and set up formulas to track player scores.

Instructions:

1. Set Up the Game Grid:

o Create a 10x10 grid starting from an appropriate position on your Excel sheet (e.g.,
starting from cell B5).

o Format the grid cells with a light blue fill colour to represent water and add borders
to each cell.

2. Add the Scoring Guide:

o Create a section on the sheet to display the scoring guide.

o List the ship types and their corresponding points:

 1 cell ship = 1 point

 2 cell ship = 2 points

PMS- 2024 Digital Technologies - Spreadsheets


 3 cell ship = 3 points

 4 cell ship = 4 points

3. Set Up the Player Score Board:

o Create sections for Player 1 and Player 2 to track their scores.

o Label each section clearly.

4. Place Ships on the Grid:

o Randomly place ships on the grid by entering the number "1" in cells representing
ship locations.

o Ensure ships are placed horizontally or vertically and follow the scoring guide for the
number of cells each ship occupies.

5. Add Playing Instructions:

 Choose a cell to attack.


 Type the number "1" in the cell.
 If the cell turns red, you hit a ship! Continue attacking.
 If the cell remains blue, you missed! Your turn is over.
 Check the scoring guide for points.
 The player with the most points wins!

6. Track Player Scores:

Create a section to calculate and display the scores for each player.

Use the following hints to set up the score tracking:

Hint 1: Use the COUNTIF function to count the number of hits for each player. For
example, =COUNTIF(B7:K16, "1") will count the cells containing "1" in the game grid.

Hint 2: Use the IF function to calculate points based on ship sizes. For example, you can
use a formula like =IF(CELL="1", POINTS, 0) to assign points for each hit based on the
ship size.

Combine these functions to update the scores dynamically as the game progresses.

PMS- 2024 Digital Technologies - Spreadsheets

You might also like