Update TextGen/gemini.py
Browse files- TextGen/gemini.py +4 -4
TextGen/gemini.py
CHANGED
@@ -81,7 +81,7 @@ def get_items_string_representation(items_list):
|
|
81 |
result += item_str
|
82 |
return result
|
83 |
|
84 |
-
def generate_map_markdown(
|
85 |
import numpy as np
|
86 |
|
87 |
# Define the room structure with walls and markers
|
@@ -98,8 +98,8 @@ def generate_map_markdown(data):
|
|
98 |
]
|
99 |
|
100 |
# Extract rooms and rooms of interest
|
101 |
-
rooms = [eval(room) for room in
|
102 |
-
rooms_of_interest = [eval(room) for room in
|
103 |
|
104 |
# Determine grid size
|
105 |
min_x = min(room[0] for room in rooms)
|
@@ -120,7 +120,7 @@ def generate_map_markdown(data):
|
|
120 |
if room == (0, 0):
|
121 |
room_char = "X"
|
122 |
elif room in rooms_of_interest:
|
123 |
-
room_char = "P" if i ==
|
124 |
else:
|
125 |
room_char = " "
|
126 |
room_structure = create_room(room_char, i)
|
|
|
81 |
result += item_str
|
82 |
return result
|
83 |
|
84 |
+
def generate_map_markdown(rooms, room_of_interest,index_exit):
|
85 |
import numpy as np
|
86 |
|
87 |
# Define the room structure with walls and markers
|
|
|
98 |
]
|
99 |
|
100 |
# Extract rooms and rooms of interest
|
101 |
+
rooms = [eval(room) for room in rooms]
|
102 |
+
rooms_of_interest = [eval(room) for room in room_of_interest]
|
103 |
|
104 |
# Determine grid size
|
105 |
min_x = min(room[0] for room in rooms)
|
|
|
120 |
if room == (0, 0):
|
121 |
room_char = "X"
|
122 |
elif room in rooms_of_interest:
|
123 |
+
room_char = "P" if i == index_exit else "?"
|
124 |
else:
|
125 |
room_char = " "
|
126 |
room_structure = create_room(room_char, i)
|