Skip to content
This repository has been archived by the owner on Jun 13, 2022. It is now read-only.

Latest commit

 

History

History
94 lines (68 loc) · 3.66 KB

README.md

File metadata and controls

94 lines (68 loc) · 3.66 KB

Schiffe Versenken

This is a work-in-progress software project which has the goal of implementing the game Battleships (in german: "Schiffe versenken") for usage on the command-line. The project is written in C++17.

The primary purpose of this project is to serve as our project for the introductory C++ course at our University.

Compilation / Build instructions

There are technically two ways to build this software:

  • The newer and shinier Makefile allows users to simply run the make command without parameters and have the software compiled for them as ./schiffeversenken. Make sure to call make clean between every build though, since make isn't smart enough to figure out when the application really needs to be rebuilt.
  • The legacy run.sh can also be used to compile the program and immediately execute it by pointing it at src/main.cpp. However, this is only recommended for use by developers working on the software since some features like the sanitizers are not useable everywhere and the resulting executable is saved as a.out.

Requirements

We only support running this software on modern and up-to-date Linux Operating Systems.

Despite our best attempts at remaining standard compliant, other operating systems are not tested and will not receive any consideration on our part.

In addition, compiling this project requires a C++17 compliant compiler. Currently we only support gcc versions 7.5.0 or newer for compiling.

We may switch to requiring support for newer C++-standards or compilers in the future.

Usage

Executing the program once you have the binary is a simple matter of calling it. This game does not accept or use any commandline arguments when executing.

After a screen giving basic information to the user is shown, the game will begin.

The boards of both players will be randomly generated by the software. (Players cannot place their own ships!)

The game also only has one mode: human player vs computer. We do not intend to implement any kind of multiplayer.

During the course of the game, both the game board of the player and that of the computer will be shown to the player at different times. Which board is currently being displayed can be seen by looking at the text directly above it.

Symbol Meaning
Unknown / Undiscovered
# Ship part that has not been hit (You can only see your own)
X Ship part that has been hit
~ No ship part was here (Miss)

Players should note that two ships cannot directly touch one-another, though diagonally adjacent ships are allowed.

To make your shot when asked to do so by the game, you need to enter the coordinate of the field you would like to shoot at.

The coordinates must be entered according to the following format: {one upper-case letter corresponding to row}{number of column in base 10}

Copyright

SchiffeVersenken - An implementation of Battleships
Copyright (C) 2022 SchiffeVersenken contributors

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

You can find the full list of authors/contributors here.