Simple Battleship game
Project description
Battleship 🛥️
Simple Battleship game in Python.
This is a simple naive implementation with dynamic grid support.
Challenge
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 player enters coordinates of the form “A5”, where "A" is the column and "5" is the row, to specify a square to target. Shots result in hits, misses or sinks. The game ends when all ships are sunk.
Run
pip3 install battleship
python3 -m battleship
Build Automation
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
battleship-py-0.1.4.tar.gz
(7.8 kB
view hashes)
Built Distribution
Close
Hashes for battleship_py-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2e60ce99089b8091f8ae7848b8fecc098c867b37a98d28320053ad2cbddd0ed |
|
MD5 | 08619db8bcc5da53c50646b5caa8ba68 |
|
BLAKE2b-256 | ed50187d3b42cc8fbe35103a75170243c067c4fe8422602cd793997a63fc4825 |