From 6b90e5fce58034fb69edfe9373ff3f7612f069bc Mon Sep 17 00:00:00 2001 From: Maoake Teriierooiterai Date: Mon, 16 Mar 2026 15:37:49 +0100 Subject: [PATCH] adding in the parsing class DataMaze the funciton transform_data --- config.txt | 7 ++++++- src/parsing/Parsing.py | 11 +++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/config.txt b/config.txt index 30d74d2..748b11e 100644 --- a/config.txt +++ b/config.txt @@ -1 +1,6 @@ -test \ No newline at end of file +WIDTH=200 +HEIGHT=100 +ENTRY=0,0 +EXIT=19,14 +OUTPUT_FILE=maze.txt +PERFECT=True \ No newline at end of file diff --git a/src/parsing/Parsing.py b/src/parsing/Parsing.py index b181be8..7d66878 100644 --- a/src/parsing/Parsing.py +++ b/src/parsing/Parsing.py @@ -3,9 +3,16 @@ class DataMaze: pass @staticmethod - def get_data(name_file: str): + def get_data(name_file: str) -> str: + data = "" try: with open(name_file, "r") as file: - print(file) + data = file.read() except FileNotFoundError: print("The file do not exist") + finally: + return data + + @staticmethod + def transform_data(data: str): + pass