Metadata-Version: 2.4
Name: ipypong
Version: 0.1.0
Summary: Play pong in Jupyter Notebooks.
Home-page: https://github.com/haesleinhuepf/ipypong
Author: Robert Haase
Author-email: robert.haase@uni-leipzig.de
License: BSD-3-Clause
Project-URL: Bug Tracker, https://github.com/haesleinhuepf/ipypong/issues
Project-URL: Documentation, https://github.com/haesleinhuepf/ipypong#README.md
Project-URL: Source Code, https://github.com/haesleinhuepf/ipypong
Project-URL: User Support, https://github.com/haesleinhuepf/ipypong/issues
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Image Processing
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ipycanvas
Requires-Dist: ipywidgets
Requires-Dist: ipyevents
Provides-Extra: testing
Requires-Dist: tox; extra == "testing"
Requires-Dist: pytest; extra == "testing"
Requires-Dist: pytest-cov; extra == "testing"
Dynamic: license-file

# ipypong 
[![PyPI](https://img.shields.io/pypi/v/ipypong.svg?color=green)](https://pypi.org/project/ipypong)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/ipypong)](https://pypistats.org/packages/ipypong)
[![GitHub stars](https://img.shields.io/github/stars/haesleinhuepf/ipypong?style=social)](https://github.com/haesleinhuepf/ipypong/)
[![License](https://img.shields.io/pypi/l/ipypong.svg?color=green)](https://github.com/haesleinhuepf/ipypong/raw/main/LICENSE)

Play pong in Jupyter Notebooks.

![](https://github.com/haesleinhuepf/ipypong/blob/main/docs/images/ipypong_demo.gif?raw=true)

## Usage


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

```python
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


[BSD-3]: http://opensource.org/licenses/BSD-3-Clause
[image.sc]: https://image.sc
[@haesleinhuepf]: https://twitter.com/haesleinhuepf

