Skip to main content

Play pong in Jupyter Notebooks.

Project description

ipypong

PyPI PyPI - Downloads GitHub stars License

Play pong in Jupyter Notebooks.

Usage

The pong() function creates an interactive Pong game in your Jupyter notebook.

from ipypong import pong
pong(players=0, difficulty_level=0.9)
  • Player Modes:

    • players=0: Two AI players
    • players=1: One human player (left paddle) and one AI player (right paddle)
    • players=2: Two human players
  • Controls:

    • Left paddle: 'w' (up) and 's' (down)
    • Right paddle: 'i' (up) and 'k' (down)
  • Customization:

    • difficulty_level: Set between 0.0 (easiest) and 1.0 (hardest)
    • ball_speed: Adjust the initial speed of the ball (default: 5)
    • canvas_width and canvas_height: Customize game dimensions

Contributing

Contributions, bug-reports and ideas for further development are very welcome.

License

Distributed under the terms of the BSD-3 license, "ipypong" is free and open source software

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

ipypong-0.1.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipypong-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file ipypong-0.1.0.tar.gz.

File metadata

  • Download URL: ipypong-0.1.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for ipypong-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9ef54b6bc1b4b423858a759049daea4be17ca460c5148478905c2981bce77630
MD5 10248fd15c1c501722e848809ffb313c
BLAKE2b-256 5d8c29f161bc0db9d64c1d34443276b08c3df75e4ec8d9f7c30013344bfc178e

See more details on using hashes here.

File details

Details for the file ipypong-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ipypong-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for ipypong-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bd258a28df6f2b0bd4c121e625e782b74b1ca72d47a1465e230cabf9e56c9f02
MD5 a5e0bc28601844645f7907553b41018d
BLAKE2b-256 53e3bfe0d99f627ca6d1105dfaa97bb2341dcb85512e25459244c5fd66d77fbd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page