Skip to content

gondar/BattleShipsCodeTest

Repository files navigation

Recruitment Test: Battleships

Solution

I wrote simple Console Application as permitted. To run it just run the Program.cs. It was developed using Xamarin on iOS so it's also best environment to view it on. Not tested to build on Windows.

Description

The challenge is to program a simple version of the game Battleships. Create an application to allow a single human player to play a one-sided game of Battleships against ships placed by the computer. The program should create a 10x10 grid, and place a number of ships on the grid at random with the following sizes:

1x Battleship (5 squares)
2x Destroyers (4 squares)

The application should take input of the form “A5”, where "A" is the column and "5" is the row, to specify a square to target. Feedback should be presented to the user to indicate whether the shot was a hit or miss. Additionally, report on the sinking of any vessels and the end of the game.

Assessment

You are free to write a Console application, Web Service or UI in order to accomplish the task.

Try to code the challenge as you would approach any typical work task; we are not looking for you to show knowledge of frameworks or unusual programming language features.

We expect the program to run error free and to the above specification. The code should be simple, consistent and follow best practices. Automated testing is highly recommended.

We prefer solutions to be submitted via a link to a Git repository (such as GitHub).

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages