Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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: 16 days ago
JSON representation

Pool Game

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 = pos

def update(self, angle):
self.angle = angle

def 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,
),
)
```