Implemented base game

This commit is contained in:
2025-06-16 20:56:36 +01:00
parent 867cbf08f4
commit 9bf157c7bd
4 changed files with 107 additions and 0 deletions

39
__init__.py Normal file
View File

@ -0,0 +1,39 @@
import logging
import pygame
#import NoPELib
#import PDOLib
class Game:
def __init__(self, surface, size):
"""
Ran when the game starts.
Args:
surface (pygame.Surface): The surface you draw to.
size (list[int, int]): The size of the surface.
"""
pygame.init()
self.surface = surface
self.size = size
def onEvent(self, event):
"""
Ran when an event is fired.
Args:
event (pygame.Event): The event that was fired
"""
pass
def draw(self):
"""
Ran once per frame, put your drawing code in here
"""
pass
def close(self):
"""
Ran when the game closes
"""
pass