adding in the parsing class DataMaze the funciton transform_data

This commit is contained in:
Maoake Teriierooiterai
2026-03-16 15:37:49 +01:00
parent 2f5d200c0a
commit 6b90e5fce5
2 changed files with 15 additions and 3 deletions
+6 -1
View File
@@ -1 +1,6 @@
test WIDTH=200
HEIGHT=100
ENTRY=0,0
EXIT=19,14
OUTPUT_FILE=maze.txt
PERFECT=True
+9 -2
View File
@@ -3,9 +3,16 @@ class DataMaze:
pass pass
@staticmethod @staticmethod
def get_data(name_file: str): def get_data(name_file: str) -> str:
data = ""
try: try:
with open(name_file, "r") as file: with open(name_file, "r") as file:
print(file) data = file.read()
except FileNotFoundError: except FileNotFoundError:
print("The file do not exist") print("The file do not exist")
finally:
return data
@staticmethod
def transform_data(data: str):
pass