Exercise definition

This commit is contained in:
docusland
2023-10-16 08:52:32 +02:00
parent cec462f691
commit c569340a25
15 changed files with 88 additions and 74 deletions

1
src/__init__.py Normal file
View File

@@ -0,0 +1 @@
from .quadtree import QuadTree, TkQuadTree

25
src/quadtree.py Normal file
View File

@@ -0,0 +1,25 @@
from __future__ import annotations
class QuadTree:
NB_NODES : int = 4
def __init__(self, hg: bool | QuadTree, hd: bool | QuadTree, bd: bool | QuadTree,bg: bool | QuadTree):
pass
@property
def depth(self) -> int:
""" Recursion depth of the quadtree"""
return 1
@staticmethod
def fromFile(filename: str) -> QuadTree:
""" Open a given file, containing a textual representation of a list"""
pass
@staticmethod
def fromList(data: list) -> QuadTree:
""" Generates a Quadtree from a list representation"""
pass
class TkQuadTree(QuadTree):
def paint(self):
""" TK representation of a Quadtree"""
pass