Skip to main content

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

Metadata

Release files for ipypong 0.1.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 ipypong 0.1.0
File Size Uploaded
ipypong-0.1.0.tar.gz 6.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ipypong 0.1.0
File Interpreter ABI Platform
ipypong-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.3 kB

Release files / ipypong-0.1.0.tar.gz

Download URL ipypong-0.1.0.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
9ef54b6bc1b4b423858a759049daea4be17ca460c5148478905c2981bce77630
BLAKE2b-256 checksum
How to use checksums
5d8c29f161bc0db9d64c1d34443276b08c3df75e4ec8d9f7c30013344bfc178e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release files / ipypong-0.1.0-py3-none-any.whl

Download URL ipypong-0.1.0-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bd258a28df6f2b0bd4c121e625e782b74b1ca72d47a1465e230cabf9e56c9f02
BLAKE2b-256 checksum
How to use checksums
53e3bfe0d99f627ca6d1105dfaa97bb2341dcb85512e25459244c5fd66d77fbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.11

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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