Skip to content

s-mehnert/Battleship

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 

T T T T T  H       H  E E E E E     U       U  L         T T T T T    I     M       M      A      T T T T T  E E E E E
    T      H       H  E             U       U  L             T        I     M M   M M    A   A        T      E
    T      H       H  E             U       U  L             T        I     M   M   M  A       A      T      E
    T      H H H H H  E E E         U       U  L             T        I     M       M  A A A A A      T      E E E
    T      H       H  E             U       U  L             T        I     M       M  A       A      T      E
    T      H       H  E             U       U  L             T        I     M       M  A       A      T      E
    T      H       H  E E E E E       U U U    L L L L L     T        I     M       M  A       A      T      E E E E E


        B B B B        A      T T T T T  T T T T T  L          E E E E E    S S S S  H       H    I    P P P P
        B       B    A   A        T          T      L          E          S          H       H    I    P       P
        B       B  A       A      T          T      L          E          S          H       H    I    P       P
        B B B B    A A A A A      T          T      L          E E E        S S S    H H H H H    I    P P P P
        B       B  A       A      T          T      L          E                  S  H       H    I    P
        B       B  A       A      T          T      L          E                  S  H       H    I    P
        B B B B    A       A      T          T      L L L L L  E E E E E  S S S S    H       H    I    P


The Ultimate Battleship Experience

--- Battleship Terminal Game (1 player mode) ---

New in version 2.0:
The program now gives the choice of 4 difficulty levels and keeps a running total of games played, games won and games lost.

Rules: 
The programm will hide 10 ships. Together they occupy a total of 20 fields.
The ships can be distributed horizontally or vertically, but not diagonally.
None of the ships touches another (not even diagonally).
The ships contain 1 carrier (4 fields), 2 battleships (3 fields), 3 carriers (2 fields) and 4 destroyers (1 field).
A notification will be displayed, once a ship has been sunk. Another notification will be displayed once all ships of the same category (e.g. all carriers) have been sunk.
Depending on the selected difficulty level the player has 80, 70, 60 or 50 missiles at their disposal. If they manage to sink all the ships, THEY WIN.
If not, the program wins.
The program is set up so that several rounds can be played in one session and keeps a running total for games played, won and lost.

How to play:
This is a terminal game, meaning you run it in the terminal of your choice (e.g. Bash), provided you have Python installed.
To play you follow the text instructions inside the game and use the keyboard for your input.
The game has been created using Python 3.9.7
For the convenience of users who would like to play the game without installing Python an .exe file was created and provided for download.

About:
This is the final project for the "Learn Python 3" course on codecademy.com, created by Peafly_78.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages