mirror of
https://github.com/maoakeEnterprise/amazing.git
synced 2026-04-28 16:04:35 +02:00
adding in the parsing class DataMaze the funciton transform_data
This commit is contained in:
+6
-1
@@ -1 +1,6 @@
|
|||||||
test
|
WIDTH=200
|
||||||
|
HEIGHT=100
|
||||||
|
ENTRY=0,0
|
||||||
|
EXIT=19,14
|
||||||
|
OUTPUT_FILE=maze.txt
|
||||||
|
PERFECT=True
|
||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user