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

15 lines
505 B
Python

import pygame
from game_object import GameObject
class Snake(GameObject):
def __init__(self, start_position: tuple|list, radius: float|int, color: tuple) -> None:
self.__pos = start_position
self.__radius = radius
self.__color = color
def draw(self, surface: pygame.Surface) -> None:
pygame.draw.circle(surface=surface,
color=self.__color,
center=self.__pos,
radius=self.__radius)