Metadata-Version: 2.2
Name: coopgame
Version: 1.19
Summary: Tooling and templates used for building games
Home-page: https://github.com/tylertjburns/coopgame
Author: tburns
Author-email: tyler.tj.burns@gmail.com
License: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Intended Audience :: Developers
Requires-Python: >3.5
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: certifi==2025.1.31
Requires-Dist: charset-normalizer==3.4.1
Requires-Dist: contourpy==1.3.0
Requires-Dist: coopgame==1.18
Requires-Dist: coopgraph==1.12
Requires-Dist: coopstorage==0.4
Requires-Dist: coopstructs==1.9
Requires-Dist: cooptools==1.49
Requires-Dist: cycler==0.12.1
Requires-Dist: docutils==0.21.2
Requires-Dist: fonttools==4.54.1
Requires-Dist: id==1.5.0
Requires-Dist: idna==3.10
Requires-Dist: importlib_metadata==8.6.1
Requires-Dist: jaraco.classes==3.4.0
Requires-Dist: jaraco.context==6.0.1
Requires-Dist: jaraco.functools==4.1.0
Requires-Dist: keyring==25.6.0
Requires-Dist: kiwisolver==1.4.7
Requires-Dist: markdown-it-py==3.0.0
Requires-Dist: matplotlib==3.9.2
Requires-Dist: mdurl==0.1.2
Requires-Dist: more-itertools==10.6.0
Requires-Dist: nh3==0.2.21
Requires-Dist: numpy==2.0.0
Requires-Dist: packaging==24.1
Requires-Dist: pandas==2.2.3
Requires-Dist: pillow==10.4.0
Requires-Dist: pkginfo==1.10.0
Requires-Dist: pygame==2.6.0
Requires-Dist: pygame-widgets==1.2.3
Requires-Dist: Pygments==2.19.1
Requires-Dist: pyparsing==3.1.4
Requires-Dist: pyperclip==1.11.0
Requires-Dist: Pypubsub==4.0.7
Requires-Dist: python-dateutil==2.9.0.post0
Requires-Dist: pytz==2024.2
Requires-Dist: pywin32-ctypes==0.2.3
Requires-Dist: readme_renderer==44.0
Requires-Dist: requests==2.32.3
Requires-Dist: requests-toolbelt==1.0.0
Requires-Dist: rfc3986==2.0.0
Requires-Dist: rich==13.9.4
Requires-Dist: scipy==1.14.0
Requires-Dist: setuptools==75.8.1
Requires-Dist: shapely==2.0.4
Requires-Dist: six==1.16.0
Requires-Dist: twine==5.1.1
Requires-Dist: typing_extensions==4.12.2
Requires-Dist: tzdata==2024.2
Requires-Dist: urllib3==2.3.0
Requires-Dist: zipp==3.21.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# coopgame
Library of tooling and templates used for building games

Example:
```
from coopgame.gameTemplate import GameTemplate
from coopstructs.vectors import Vector2
import pygame
from coopgame.colors import Color
from coopgame.sprites import RectangleSprite

class MyGame(GameTemplate):
    def __init__(self):
        super().__init__()

        self.sprites = pygame.sprite.Group()

    def draw(self, frames):
        for entity in self.sprites:
            self.screen.blit(entity.surf, entity.rect)

    def handle_hover_over(self, mouse_pos_as_vector: Vector2):
        pass

    def handle_left_click(self):
        self.sprites.add(RectangleSprite(self.mouse_pos_as_vector(), Color.BLUE, 10, 10))

    def handle_right_click(self):
        self.sprites.add(RectangleSprite(self.mouse_pos_as_vector(), Color.RED, 20, 30))

    def handle_key_pressed(self, pressed_key):
        if pressed_key == pygame.K_r:
            self.sprites.empty()

if __name__ == "__main__":
    import logging
    import loggingConfig

    loggingConfig.initLogging(loggingLvl=logging.DEBUG)
    game = MyGame()
    game.main()
```
