Skip to main content

ECM1400-Battleships-Coursework

Introduction

This is the repository for the ECM1400 Battleships Coursework. The aim of this project is to create a Battleships game in Python. The game will have multiple ways to play, either in a console or with a web interface.

Prerequisites

  • Python 3.11

Installation

  • Clone the repository
  • RUN pip install -r requirements.txt

Getting Started

For Simple Game

  • RUN python game_engine.py -c

For Command Line Game against AI

  • EDIT placement.json to change where your ships will be placed
  • Format of {"Ship_Name": ["X_coord", "Y_coord", "direction either v or h"]}
  • RUN python mp_game_engine.py -c

For Web Game against AI

Testing

  • RUN pytest

Developer Documentation

Accessing Logs

  • Logs for the games are stored in battleships.log

Sphinx/Autodoc

To access the sphinx autodoc documentation, open docs/build/html/index.html in your browser or visit https://edguardia.github.io/ECM1400-Battleships-Coursework/

Config Documentation

  • config.yaml contains the configuration for the game. This includes the board size
  • To edit the board size, change the board_size variable in config.yaml to an integer preferably less than 20
  • You can also change level of logging here by setting logging_level to one of DEBUG, INFO, WARNING, ERROR, CRITICAL, NOTSET

  • To edit the number or length of battleships add or edit new rows in battleships.txt with the format name_of_ship, length_of_ship

Details

Authors

  • Edward Pratt

Licence

  • GPL-3.0

Source

https://github.com/Edguardia/ECM1400-Battleships-Coursework

Documentation

https://edguardia.github.io/ECM1400-Battleships-Coursework

Self Assessment

Complete Features

Partially Complete Features

  • Difficulty Levels
    • AI has been slightly improved to stop it hitting the same squared twice
  • Testing
    • Most of the testing has been written
    • Not all custom functions have written tests
  • Config Files
    • Config files have been implemented but not for all features user could choose

Incomplete Features

  • Multi-Player Interface

Metadata

Release files for battleships-pkg-epratt 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for battleships-pkg-epratt 1.0.0
File Size Uploaded Provenance Actions
battleships-pkg-epratt-1.0.0.tar.gz 17.6 kB Without provenance Details for battleships-pkg-epratt-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for battleships-pkg-epratt 1.0.0
File Interpreter ABI Platform Actions
battleships_pkg_epratt-1.0.0-py3-none-any.whl Python 3 none any Details for battleships_pkg_epratt-1.0.0-py3-none-any.whl

Total release size: 36.1 kB

Release files / battleships-pkg-epratt-1.0.0.tar.gz

Download URL battleships-pkg-epratt-1.0.0.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
eb39412e6fd2f4f48929c059e2984f3489ce9e2b44c48cc282b9e25e79af6279
BLAKE2b-256 checksum
How to use checksums
439d65692d71481bebb98f2e72f1469329015fc3c9f3042e48a79f2eb923cc2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / battleships_pkg_epratt-1.0.0-py3-none-any.whl

Download URL battleships_pkg_epratt-1.0.0-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d07a04b2b58391fbe16e62db7aa59b61a5c46f12100d5d23176e5b3884cea83f
BLAKE2b-256 checksum
How to use checksums
935cad9a0d152bb8e463491412819121ca46191803b0ac05935973cf6246d64f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for battleships-pkg-epratt 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page