Visual Studio build
Make build
A simple game of Battleship, written in C++. The purpose of this repository is to serve as an entry point into coding exercises and it was especially created for scrum.orgs Applying Professional Scrum for Software Development course (www.scrum.org/apssd). The code in this repository is unfinished by design.
This code can be compiled either by using MAKE or Visual Studio. It has been tested on Windows 10 and on Debian GNU/Linux 10
Build and run it using MAKE
cd MAKE
make
./Battleship.exe
You can use a Docker Container as a save environment providing all necessary tools to build and run the Battleship application-
cd battleship-cpp
docker build . -t battleship
docker run -it -v ${PWD}:/battleship battleship bash
Build and run it using MAKE
cd /battleship/MAKE
make
./Battleship.exe
if you are using Visual Studio, you can use the TestExplorer to run tests. You find the tests in the MSTest format in the folders
- Battleship.Ascii.Tests
- Battleship.GameController.Tests
You can als run Unit-Tests without Visual STudio, for example in the Docker Container. They are created using CppUnit (https://sourceforge.net/projects/cppunit/). These tests can be found in the folders
- Battleship.GameController.Tests.CppUnit
- Battleship.Ascii.Tests.CppUnit
To build and run the unit tests, use these commands:
cd /battleship/MAKE
make TestRunner.exe
./TestRunner.exe