Skip to content

A project from the Business Informatics course in the Operating Systems and Computing Networks module

Notifications You must be signed in to change notification settings

zakmo1337/Battleships

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 

Repository files navigation

#Battleships🚢

Please install the following Python packages:

For "random2": pip install random2

For "os": pip install os

For "cfonts": pip install python-cfonts

If there are any problems, please install Colorama as well
For "colorama": pip install colorama

The other imported plug-ins should already be installed in Python. image image

Batleships is originally a harmless symbol game, the origin of which goes back at least to the end of the 19th century and its basic structure has remained unchanged to this day. We have transferred this basic structure into the programming language Python. Before the start of the game, the player chooses a place on the 10x10 large field where his ships should be. This is done by entering and confirming the coordinates of the location one after the other. (A1, A2, A3 etc.) It is always shown which ship it is about at the moment. When all ships have been placed, the playing field with the player's ships appears one last time.

The game begins. Coordinates are fired at the player who suspects an enemy ship.

"If the player hits, an" o "appears" If the player sinks a ship, a "0" appears "If the player does not hit anything, an" x "appears

It is fired back and forth until a player runs out of ships. That player is then the loser. If there are errors in the entry, the game tries to help with the entry and give tips. \ N "" With the player vs "" When the game is over, the playing field disappears and the winner is displayed. \ N "" As an additional function the number of rounds in which the player has won is displayed. \ n "" "" The following rules must be observed: "1. Ships may lie on the edge, but not beyond it." 2. Ships cannot be set up diagonally. " 3. Coordinates can be written in upper case as well as in lower case, but the letter must always be in front and the coordinate may contain at most one letter and one number.

Object of the game: The winner of the game is the player who has completely sunk all enemy ships.

About

A project from the Business Informatics course in the Operating Systems and Computing Networks module

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages