This repository has been archived on 2025-11-27. You can view files and clone it, but cannot push or open issues or pull requests.
python-kurs-itslearning/projekt/meinspiel.py
2025-11-27 22:01:37 +01:00

19 lines
471 B
Python

import pygame
class MeinSpiel:
bilder = ["Bilder/Grass.jpg","Bilder/Hase.jpg"]
spielfeld = []
def __init__(self, felderX, felderY):
for x in range(felderX):
self.spielfeld.append([])
for y in range(felderY):
self.spielfeld[x].append(0)
def anfangsKonfiguration(self):
self.spielfeld[5][5] = 1
def tasteGedrueckt(self, taste):
if pygame.K_w == taste:
print(taste)