15 lines
495 B
Python
15 lines
495 B
Python
from snake_segment import SnakeSegment
|
|
|
|
|
|
class SnakeState:
|
|
def _get_next_pos(self, old_pos: tuple, radius:float) -> tuple:
|
|
pass
|
|
|
|
def get_next_head(self, old_head: SnakeSegment) -> SnakeSegment:
|
|
return SnakeSegment(center=self._get_next_pos(old_head.get_position(), old_head.get_radius()),
|
|
radius=old_head.get_radius(),
|
|
color=old_head.get_color())
|
|
|
|
@property
|
|
def type(self):
|
|
return self.__class__ |