Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tynab/pool-game
Pool Game
https://github.com/tynab/pool-game
game game-pool game-python game-wasm pip pip3 pool pool-game py pygame pygbag pymunk python python-game python-wasm tynab wasm wasm-game wasm-python yan
Last synced: about 6 hours ago
JSON representation
Pool Game
- Host: GitHub
- URL: https://github.com/tynab/pool-game
- Owner: Tynab
- Created: 2023-10-31T15:48:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-15T07:59:20.000Z (18 days ago)
- Last Synced: 2025-01-30T07:35:12.435Z (3 days ago)
- Topics: game, game-pool, game-python, game-wasm, pip, pip3, pool, pool-game, py, pygame, pygbag, pymunk, python, python-game, python-wasm, tynab, wasm, wasm-game, wasm-python, yan
- Language: Python
- Homepage:
- Size: 9.63 MB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# POOL GAME
The Pool Game project is a Python-based endeavor utilizing libraries such as pygame and pymunk. This project aims to create a virtual representation of the classic game of pool, implementing realistic physics and interactive gameplay features for an engaging user experience.## IMAGE DEMO
## CODE DEMO
```python
# create pool cue
class Cue:
def __init__(self, pos):
self.original_image = cue_image
self.angle = 0
self.image = pygame.transform.rotate(self.original_image, self.angle)
self.rect = self.image.get_rect()
self.rect.center = posdef update(self, angle):
self.angle = angledef draw(self, surface):
self.image = pygame.transform.rotate(self.original_image, self.angle)
surface.blit(
self.image,
(
self.rect.centerx - self.image.get_width() / 2,
self.rect.centery - self.image.get_height() / 2,
),
)
```