se_uebungen/snake/snake.py
2026-04-16 16:09:49 +02:00

15 lines
443 B
Python

import pygame
from game_object import GameObject
class Snake(GameObject):
def __init__(self, start_position, radius, color):
self.__pos = start_position
self.__radius = radius
self.__color = color
def draw(self, surface):
pygame.draw.circle(surface=surface,
color=self.__color,
center=self.__pos,
radius=self.__radius)