Portfolio

Battleship Game

Tools: Microsoft Visual C# 2005

Introduction

Jacqueline is currently enrolled in various courses to expand her knowledge in web development. This is one of the projects that she has done as part of her course work for Introduction to C# at George Brown College.

Challenge

The project involves implementing a simplified battleship game. It is a two players game where both players try to destroy the ships in a single grid by specifying a set of coordinates that are on the grid. For every "Hit", the player gets one point and another turn. If a player misses, the other player gets a turn. The player with most points at the end wins the game.

Solution

Jacqueline has designed the game as specified by the requirements. The program generates the location of ships radomly and both players can take turn to destroy the ships. When generating the grid, one must check whether the ship is inside the boundaries of the grid and whether there is collision with other ships. Jacqueline also added an additional condition to the game by not allowing ships to be placed adjacent to each other on the grid.

Through this project, Jacqueline has gained experience in working with Microsoft Studio .NET and programming using the C# language.

Download Source Files

Battleship

Battleship game.