battleship-py


Namebattleship-py JSON
Version 0.2.2 PyPI version JSON
download
home_pagehttps://github.com/joamag/battleship
SummarySimple Battleship game
upload_time2022-12-05 23:26:53
maintainer
docs_urlNone
authorJoão Magalhães
requires_python
licenseApache License, Version 2.0
keywords game battleship
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Battleship 🛥️

Simple Battleship game in Python.

<img src="https://github.com/joamag/battleship/raw/master/res/videos/001-demo.gif" width="460" />

This is a simple implementation with dynamic grid support (defaults to 10x10).

## 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

```bash
pip3 install battleship-py
python3 -m battleship
```

## Commands

| Name    | Description                                      |
| ------- | ------------------------------------------------ |
| HELP    | Prints an help message about the commands.       |
| QUIT    | Quits the Battleship game.                       |
| DESTROY | Destroys the game by shooting all the vessels.   |
| PRINT   | Prints the current state of the game to console. |
| EMOJI   | Prints the emoji version of the state.           |
| (X)(Y)  | Shoots the target at coordinate (eg: A5).        |

## Build Automation

[![Build Status](https://github.com/joamag/battleship/workflows/Main%20Workflow/badge.svg)](https://github.com/joamag/battleship/actions)
[![PyPi Status](https://img.shields.io/pypi/v/battleship-py.svg)](https://pypi.python.org/pypi/battleship-py)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/joamag/battleship",
    "name": "battleship-py",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "game battleship",
    "author": "Jo\u00e3o Magalh\u00e3es",
    "author_email": "joamag@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/42/55/9fbffcbe666f82e8102e9baacff1790d991830999e9154c902ef310bb3f1/battleship-py-0.2.2.tar.gz",
    "platform": null,
    "description": "# Battleship \ud83d\udee5\ufe0f\n\nSimple Battleship game in Python.\n\n<img src=\"https://github.com/joamag/battleship/raw/master/res/videos/001-demo.gif\" width=\"460\" />\n\nThis is a simple implementation with dynamic grid support (defaults to 10x10).\n\n## Challenge\n\nCreate an application to allow a single human player to play a one-sided game of Battleships against ships placed by the computer.\n\nThe program should create a 10x10 grid, and place a number of ships on the grid at random with the following sizes:\n\n* 1x Battleship (5 squares)\n* 2x Destroyers (4 squares)\n\nThe player enters coordinates of the form \u201cA5\u201d, 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.\n\n## Run\n\n```bash\npip3 install battleship-py\npython3 -m battleship\n```\n\n## Commands\n\n| Name    | Description                                      |\n| ------- | ------------------------------------------------ |\n| HELP    | Prints an help message about the commands.       |\n| QUIT    | Quits the Battleship game.                       |\n| DESTROY | Destroys the game by shooting all the vessels.   |\n| PRINT   | Prints the current state of the game to console. |\n| EMOJI   | Prints the emoji version of the state.           |\n| (X)(Y)  | Shoots the target at coordinate (eg: A5).        |\n\n## Build Automation\n\n[![Build Status](https://github.com/joamag/battleship/workflows/Main%20Workflow/badge.svg)](https://github.com/joamag/battleship/actions)\n[![PyPi Status](https://img.shields.io/pypi/v/battleship-py.svg)](https://pypi.python.org/pypi/battleship-py)\n[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://www.apache.org/licenses/)\n\n\n",
    "bugtrack_url": null,
    "license": "Apache License, Version 2.0",
    "summary": "Simple Battleship game",
    "version": "0.2.2",
    "split_keywords": [
        "game",
        "battleship"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "057b91effe07954ebf8bbe5ea7446e3e",
                "sha256": "04e0a9deca4357894c8a65a94ff45ba85993bedd448bfe0a4aaa643cb2181a2a"
            },
            "downloads": -1,
            "filename": "battleship_py-0.2.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "057b91effe07954ebf8bbe5ea7446e3e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 10075,
            "upload_time": "2022-12-05T23:26:51",
            "upload_time_iso_8601": "2022-12-05T23:26:51.673744Z",
            "url": "https://files.pythonhosted.org/packages/5c/3b/7e484a73373af911d280aa81175c5a8fc8f74794388267932dd6b5ade7c3/battleship_py-0.2.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "4d5bc3f65108219e2bfa7551d3ee8048",
                "sha256": "f820126ec469be1dce1858ebf65a59faefebdea13c87e790543ceac742e4d10f"
            },
            "downloads": -1,
            "filename": "battleship-py-0.2.2.tar.gz",
            "has_sig": false,
            "md5_digest": "4d5bc3f65108219e2bfa7551d3ee8048",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8456,
            "upload_time": "2022-12-05T23:26:53",
            "upload_time_iso_8601": "2022-12-05T23:26:53.015386Z",
            "url": "https://files.pythonhosted.org/packages/42/55/9fbffcbe666f82e8102e9baacff1790d991830999e9154c902ef310bb3f1/battleship-py-0.2.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-05 23:26:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "joamag",
    "github_project": "battleship",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "battleship-py"
}
        
Elapsed time: 0.03996s